javaranch

Overriding v/s Hiding

Many people have heard that you can’t override a static method. This is true – you can’t. However it is possible to write code like this: class Foo { public static void method() { System.out.println(“in Foo”); } } class Bar… Read More ›

%d bloggers like this: