class A { static{ get(); } static void get(){ System.out.println("HELLO"); } } class B extends A { public static void main(String[] args) { } } Ouput -
HELLO
HowOutput:
HELLO
How is static method of class AA getting called.I I can understand static method of B getingB getting called but not of AA.