Tag Archives: exercises

String 1 and Array 1 Exercises

Exercises for String 1 and Array 1 (no loops)

When you are done, you can copy and past the score() method below into your class. It will test some (but, by no means all) of the things that your code should do

Create a class called StrArr1 and add each method below into it.

screenshot.1

 

 

For the absVals()  method below use the Math.abs() Java method.

screenshot.3

screenshot.1

 

screenshot.4

For the  randos1to10()   method below use the  Math.random()  Java method. Create a new array to store random integers. Each integer should be [1,10]

screenshot.5