+ 1
Can't run a while loop code.(error: package system does not exist)
can anyone help me with this code of while loop.. I am unable to run it. It's showing error on "system.out.println" don't know why? public class Program { public static void main(String[] args) { int x = 1; system.out.println("Before the Loop"); while (x<4) { system.out.println("In the Loop"); system.out.println("value of x is" +x); x = x+1; } system.out.println("After the loop"); } }
2 Réponses
+ 7
the s in "system" should be in caps. Like this:
System.out.println(..);
+ 1
thanks bro.
faith restored :D :D