
Jason V. answered 03/14/19
Tutor
5.0
(870)
Experienced tutor ready to help you master Java!
There are two cases to consider:
- Your typical Java class is already static by definition. By typical, we mean that the class is defined in it's own Java file with a class name that matches the name of the file. A normal top-level class. By static we mean that the class can exist without an instance. You don't need to call "new" to create a class.
- A less common nested class can be a member class or a static class.
- If the static keyword is not used then the class is a "nested member class" and an instance of the parent class is required.
- If the static keyword is used then the class is a "nested static class" and the name of the parent class can be used to access the class.