When I first started out with Java I got that error too many times to count. I would simply cover it up by either instantiating locally or declaring my calling method static without fully understanding what was going on.
Needless to say that led to unexpected troubles later on. In short, it is definitely worth your time(it won't take that long) to verse yourself in just what static and instance variables and methods are and how they are properly used.
I promise you'll never see that error again in your code after you do!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.