+ 1
What is the mistake in this program.?
I am writing a program on the series 1 12 Like this It is showing error and asking for identifier. Please help me. the program is given below 👇 public class Program { public static void main(String[] args) { for(int i=1; i<=10; i++) { if (i==2) break; } } System .out.print(i); }
5 ответов
+ 1
You are trying to print i outside the for loop where variable i is declared.
0
Ok
0
No it is solved
0
But thanks for your helpAMOGHA. A. K.