Sample 1:
class Animal { public static void saySomething() { System.out.print(\" Gurrr!\"); } } class Cow extends Animal { public static void
Static methods are tied to the "Class", not the "Instance" of the object. Since you are referring to an "Animal" and calling the static method saySomething(). It will always make the call to "Animal" unless you are referring to a Cow.