Netbeans prevents me from making a static class. How can I make one?
I made class like: right click on project > new > Java Class. Then I just add a static keyword on the class created.
Netbeans prevents me from making a static class. How can I make one?
I made class like: right click on project > new > Java Class. Then I just add a static keyword on the class created.
 
    
    You can not!
Only public, final and abstract modifier are allowed in a Java Class.
However, you can write a static, private nested class. But only in nested class.
 
    
    Static class are Nested Classes. You cannot create a new class (a new file .java) marked by static modificator.
