자격증/OCJP_ExamC
QUESTION 33
IT grow.
2018. 7. 24. 20:08
반응형
QUESTION 33Given:1. public static void main(String[] args) {2. for (int i = 0; i <= 10; i++) {3. if (i > 6) break;4. }5. System.out.println(i);6. }What is the result?A. 6B. 7C. 10D. 11E. Compilation fails.F. An exception is thrown at runtime.Solution : E
plus imformation
Main.java:5: cannot find symbol
symbol : variable i
location: class Breaker
System.out.println(i);
^ 1 error
반응형