Complete all problems
1, 3, 7, 10, 15, 17, 21, 35
1.What are the valid ways to declare an integer array named a? (Check all that apply.)
int [] a;
int a [];
array int a;
int array a;3.An array a has 30 elements; what is the index of its last element?
29
30
31
7.How do you retrieve the number of elements in an array a?
a.length ()
a.length
a.size ()
a.size
10.Aggregate comparison of arrays is possible in Java.
true
false
15.What is the output of this code sequence?17.What is the output of this code sequence?21.What is the output of this code sequence?35. Outline and discuss how to declare, instantiate and access array elements in shortest amount of code. Include your assessment on the pros and cons of this method.