Comment on Tutorial - Method Overriding in Java By Henry



Comment Added by : SUNIL SHAH

Comment Added at : 2012-05-25 06:17:23

Comment on Tutorial : Method Overriding in Java By Henry
you have extended class Abc within class Abc
the correct code is
class Abc
{
public void display()
{
System.out.println("hai");
}
}
class Bca extends Abc
{
public void display()
{
System.out.println("hello");
}
public static void main(String[] args)
{
Bca obj=new Bca();
obj.display();
}
}


View Tutorial



Subscribe to Tutorials

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. very useful example. Thanks for this help.
View Tutorial          By: Saurabh at 2010-04-23 04:50:13

2. Hii I m Ravi. This is a good example.
Here

View Tutorial          By: Ravi at 2011-02-17 09:09:06

3. Hi please help me out..

i am gettin

View Tutorial          By: sasivarnan at 2011-04-22 14:15:40

4. i created report. but i move to second page all de
View Tutorial          By: nadeekadn at 2012-04-30 10:11:42

5. I really not get your points...
I don't kno

View Tutorial          By: darshit jain at 2014-05-22 09:07:45

6. i have a problem .
i am getting an error ca

View Tutorial          By: chaitra at 2011-11-16 07:28:29

7. hello sir

i am simulating railway r

View Tutorial          By: karthick at 2008-08-30 03:09:42

8. I know core java jsp and sql. I want to retrieve d
View Tutorial          By: Vinoth at 2011-08-16 07:22:15

9. for me also The code gives the following exception
View Tutorial          By: ashitha at 2007-09-12 03:09:12

10. i WROTE A FILE READER LIKE IT WAS IN THE SAMPLE BU
View Tutorial          By: LILI at 2011-11-06 01:47:20