1.

Consider the following Java code fragment. Which of the following statement is true?Line NoCode Statement1public class While2{3 public void loop()4 {5 int x = 0;6 while (1)7 {8System.out.println(“x plus one is” + (x + 1));9 }10 }11}

A. There is syntax error in line no. 1
B. There are syntax errors in line nos. 1 & 6
C. There is syntax error in line no. 8
D. There is syntax error in line no. 6
Answer» E.


Discussion

No Comment Found