Comment on Tutorial - Method Overriding in Java By Henry



Comment Added by : georgy

Comment Added at : 2009-10-22 03:13:01

Comment on Tutorial : Method Overriding in Java By Henry
I HAVE ONE DOUBT.

public class Animal {

public static void testClassMethod1() {
System.out.println("The class method in Animal.");
}
public void testInstanceMethod() {
System.out.println("The instance method in Animal.");
}
}


public class Cat extends Animal {
public static void testClassMethod() {
System.out.println("The class method in Cat.");
}
public void testInstanceMethod() {
System.out.println("The instance method in Cat.");
}
}


public static void main(String[] args) {
// TODO code application logic here
Cat myCat = new Cat();
myCat.testClassMethod1();

}
my QUESTION is that can we call "myCat.testClassMethod1()" as OVERRIDING.if yes then why?


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. thank you very much....
View Tutorial          By: divya at 2013-01-06 15:50:43

2. Excellent
View Tutorial          By: Dev at 2008-08-01 02:41:25

3. Very good
View Tutorial          By: dizh at 2014-02-21 07:48:19

4. finally i got it !!! thanks a lot!!! you really he
View Tutorial          By: maher at 2010-11-11 02:44:07

5. thanks for all samples..
View Tutorial          By: 珠洲市 at 2013-03-01 09:47:46

6. i want to need SCJD Dums. so please help me that w
View Tutorial          By: Dayamay singh at 2009-01-03 00:07:06

7. super example...it very useful for me...
View Tutorial          By: elan at 2011-06-02 07:54:39

8. this is really cool......
View Tutorial          By: solex at 2009-05-16 04:02:35

9. Now what the hell does all this mean???
To

View Tutorial          By: Søren at 2011-09-22 03:13:53

10. Dear sir i am complete my B.Tech in this year but
View Tutorial          By: Sarvesh at 2012-04-17 15:16:46