Find the errors
1. int[] collection = new int[-20];
2. int [] hours = 8, 12, 16;
3. int[] table = new int [10];
Short Answers
1. What is the difference between an array size declarator and asubscript?
2. Look at the following array definition:
Int[] values = new int[10];
a. How many elements does the array have?
b. What is the subscript of the first element in the array?
c. What is the subscript of the last element in the array?
3. In the following array definition:
Int[] values = {4, 7, 6, 8, 2};
What does each of the following code segments display?
System.out.printIn (values[4]); a._______________________
X = value[2] + values [3];
System.out.printIn(x); b._______________________
X =
PayPal Gateway not configured
PayPal Gateway not configured