MCQs > IT & Programming > Java > Result of the code? public class Quest { int i=0; public static void main(String argv[]) { } Quest() { top: while(i <2) { System.out.println(i); i++; continue top; } } }

Java MCQs

What would be the result of the following code? public class Quest { int i=0; public static void main(String argv[]) { } Quest() { top: while(i <2) { System.out.println(i); i++; continue top; } } }

Answer

Correct Answer:

The code will not compile as a target label cannot appear before the corresponding continue or break statement.


Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it