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. I have error on "serversocket", vb.net h
View Tutorial          By: stephen at 2012-07-14 19:40:03

2. Thanks.
View Tutorial          By: Joe at 2011-12-07 11:41:14

3. i m a student of Bahria university,Pakistan.and th
View Tutorial          By: Rao Waseem at 2011-05-14 12:55:53

4. nice example!!
View Tutorial          By: gayathri subramanian at 2010-08-18 09:27:59

5. Thanks for help
View Tutorial          By: Asha at 2014-12-20 08:25:48

6. I don't undrstnd.. cz I think in recurs the method
View Tutorial          By: Alina Ali at 2014-11-13 03:06:17

7. Hi All could you pls. send the execution of the ab
View Tutorial          By: subbu at 2008-01-28 03:14:27

8. not working on mozila firefox 3.1. I tested it.
View Tutorial          By: sushma at 2009-10-08 00:07:47

9. A good and useful tutorial for beginners.
t

View Tutorial          By: Hayk at 2010-01-12 10:55:15

10. This is a bad example, it does not check if the al
View Tutorial          By: Erik at 2011-02-12 07:16:20