The static method someMethod(int) from the type SomeClass should be accessed in a static way"

If you get a notification similar to that, what it means is don't access the method this way.

SomeClass someClass = new SomeClass();
someClass.someMethod(42);

You should just call it from the class this way,

SomeClass.someMethod(42);

The look very similar, but you don't have to instantiate the class since it is a static class/method.

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.