1.write code that sets each element of an array called nums to the value of the constant INITIAL.
2.Write code that prints the values stored in an array called names backwards.
3.Write code that sets each element of a boolean array called flags to alterning values (true at index 0. false at index 1, etc)
4.Write a method called sumArray that accepts an array of floating point values and returns the sum of the values stored in the array.
5.Write a method called switchThem that accepts two integer arrays as parameters and switched the contents of the arrays. Take into account that the arrays may be of different sizes.
If anyone can help me you totally rock.I am so dumb when it comes to java I don't know how I got this far. Please help me I think I have number 1 let me know if this is right?
1.// init
int[] intArray = new int[10];
for (int i=0; i<intArray.length; i++)
intArray[i] = constant INITIAL;
// print in revers
for (int i=intArray.length-1; i>=0; i--)
System.out.println(intArray[i]);