Why does the below code print \"Main\"?
public class Main { public static void method() { System.out.println(\"Main\"); } public sta
Java performs early binding for static methods, unlike instance methods which are dynamically bound.
Because your object variable is of type Main the call is bound to the superclass implementation at compile time.
A good explanation is available here.