This is the example i got from dans exam
class E {
void printS1(){System.out.print("E.printS1 ");}
static void printS2() {System.out.print("E.printS2 ");}
}
class F extends E {
void printS1(){System.out.print("F.printS1 ");}
static void printS2() {System.out.print("F.printS2 ");}
public static void main (
String args[]) {
E x = new F(); x.printS1(); x.printS2();
}
}
The result is
F.printS1 E.printS2
---
Any one have any idea about the static method overriding. I think static method always call on reference.
Please correct me... if I am making mistake.