Sample 1:
class Animal {
public static void saySomething() { System.out.print(\" Gurrr!\");
}
}
class Cow extends Animal {
public static void
You cannot override static methods with the same signature in subclasses, just hide them.
For class methods, the runtime system invokes the method defined in the compile-time type of the reference on which the method is called. For instance methods, the runtime system invokes the method defined in the runtime type of the reference on which the method is called.
http://life.csu.edu.au/java-tut/java/javaOO/override.html