Find the Error throughout each step. 1. Int[] collection = new int[-20]; 2. Int[] hours = 8,

Question:

Find the Error throughout each step.

1.
Int[] collection = new int[-20];

2. Int[] hours = 8, 12, 16;

3. Int[] table = new int[10];
for (int x = 1; x <= 10; x++)
{
 table[x] = 99;
}

4. String[] names = { "George", "Susan" };
Int totalLength = 0;
for (int i = 0; i < names.length(); i++)
totalLength += names[i].length;

5. String[] words = { "Hello", "Goodbye" };
System.out.println(words.toUpperCase());

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: