This is the image before I run code:
And this is the image after running the code:
Please help me.
I was expecting the code to be running but, it throws error.
This is the image before I run code:
And this is the image after running the code:
Please help me.
I was expecting the code to be running but, it throws error.
You need a static void main()
for your program to start:
public class print1_10 {
public static void main(String[] args) {
int counter = 1;
while (counter < 11) {
System.out.println(counter);
counter++;
}
}
}
See this previous question for more information...