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];

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());

Step by Step Solution

3.53 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution 1 Int coll... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!