you need to pass the scjp again or improve yourself to know that the static method can be called by both the class name and instance name.
A method that is declared static is called a class method. A class method is always invoked without reference to a particular object. An attempt to reference the current object using the keyword this or the keyword super in the body of a class method results in a compile-time error. It is a compile-time error for a static method to be declared abstract.
A method that is not declared static is called an instance method, and sometimes called a non-static method. An instance method is always invoked with respect to an object, which becomes the current object to which the keywords this and super refer during execution of the method body.
Static method can be inherited
public class Test1
public static void testMethod()
public class Test2 extends Test1
public static void main(String args)
Test2 test2 = new Test2();
If the class is declared public, then the default constructor is implicitly given the access modifier public ; if the class is declared protected, then the default constructor is implicitly given the access modifier protected ; if the class is declared private, then the default constructor is implicitly given the access modifier private ; otherwise, the default constructor has the default access implied by no access modifier.
Provides classes and interfaces for obtaining reflective information about classes and objects. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions.