Question: In each of the following Java classes, point out the error and the first compilation stage where it is detected: 1) class C1 { void

In each of the following Java classes, point out the error and the first compilation stage where it is detected:

1)

class C1 { void example() { int i = 0; while ( i + 100 ) { i++; } } }

2)

class C2 { void example() { int i = 0; while ( i < 100 ) { i+; } } }

3)

class C3 { void example() { int i = 0; while ( i < 100 ) { i++; ) } }

4)

class C4 { void example() { int i = 0; while ( i < 100 ) { i+\; } } }

5)

class C5 { void example() { i = 0; while ( i < 100 ) { i++; } } }

6)

class C6 { void example() { int i; while ( i < 100 ) { i++; } } }

7)

class C7 { void example() { int i = 0; whil ( i < 100 ) { i++; } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!