why static methods and variables are accessible without any instance of class [closed]

Actually, there is a class object representing each class in the JVM. So, the line Why is it that all static methods and variables are accessible without any instance of class is incorrect.

The JVM creates class objects (different from class instances) representing classes.

Example : String.class, Class.class etc

Leave a Comment