int counter = 0;
public static void main(String args)
It gave me this error.
Main.java:6: error: non-static variable counter cannot be referenced from a static context
How do I make it recognize the variables of the class?
If you want to unleash your potential in this competitive field, please visit the Java course page for more information, where you can find the Java tutorials and Java frequently asked interview questions and answers as well.
This topic has been locked/unapproved. No replies allowed