Comment on Tutorial - Method Overriding in Java By Henry



Comment Added by : georgy

Comment Added at : 2009-10-22 02:46:10

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. Can any budy plz send me a source code of Sending
View Tutorial          By: vilas at 2010-03-23 20:38:08

2. I did this exactly.
In my case, the fix.php

View Tutorial          By: Manorasa at 2010-06-29 23:32:24

3. Finally! You enlighted me in a small problem: it w
View Tutorial          By: Fernando Martin at 2011-02-25 12:54:58

4. hello, please i need a help.. i'm trying to make a
View Tutorial          By: Ludmila at 2012-12-10 17:56:00

5. thumbs up!
View Tutorial          By: huang at 2013-03-28 04:02:33

6. Very precise and informative tutorial. Appreciated
View Tutorial          By: Rishi Raj at 2011-07-08 12:25:04

7. i want to learn the java from basics onwards.
View Tutorial          By: vinay at 2010-03-08 22:54:15

8. nice one.. i lik dis page... very informative for
View Tutorial          By: lokesh at 2013-01-10 09:06:22

9. Hi, I am new to J2ME and just recently i created a
View Tutorial          By: andre at 2011-08-02 22:57:05

10. just I am need of some of the soft copy related to
View Tutorial          By: shani at 2015-08-12 06:01:05