Refer to the given code
It is an eg of overriding of static methos.Here it is invoking the process method of class A1 & the output comes as "A1" .But as per Overriding rule it always check object type not the refference type. Kindly provide the explanation .
class A1 {
public static void process() {System.out.println("A1");}
}
class B1 extends A1{
public static void process(){System.out.println("B1");}
}
public class Test22{
public static void main(
String[] args)
{
A1 a=new B1();
a.process();
}
}