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. this article is very good for the beginners. I am
View Tutorial          By: manoj kumar palbabu at 2009-12-02 10:44:04

2. Excellent Example...... To understand the concept
View Tutorial          By: SUNNY at 2009-02-24 23:41:04

3. really great, goes more in depth than cplusplus.co
View Tutorial          By: ss80 at 2008-07-02 06:45:47

4. i have asked for refercing the object of main clas
View Tutorial          By: deepesh at 2012-08-20 10:33:58

5. hi,

i am trying to run this SMS jav

View Tutorial          By: Raghavendra at 2010-12-29 08:27:02

6. php-cgi.exe return popup "is not a valid Win3
View Tutorial          By: noob at 2013-06-30 09:47:38

7. Thanks a ton!!! It was really very useful :)
View Tutorial          By: Ankit at 2015-05-11 12:30:41

8. Hello,

Can you please send me the c

View Tutorial          By: criz at 2007-10-16 21:06:30

9. how about this?...
#include<iostream.h&g

View Tutorial          By: nadia at 2010-10-04 21:48:04

10. You don't have to call the constructors. When you
View Tutorial          By: Watson at 2011-05-04 10:44:23