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. Thanks for the above description, but pls let me k
View Tutorial          By: Amit Goyal at 2009-09-25 05:33:10

2. i need some more basic programes in java
View Tutorial          By: nivin at 2012-10-19 09:14:27

3. this code works very well for me , but it runs onl
View Tutorial          By: m. usman at 2013-08-31 14:17:22

4. hey what If I'm connecting to a server(XMPP in my
View Tutorial          By: garima at 2015-08-10 13:23:40

5. Sir. Please give an example which is small and und
View Tutorial          By: mogesie gedamu at 2011-12-19 12:55:33

6. nice explanation indeed, but can u please explain
View Tutorial          By: ishika at 2015-06-23 09:16:16

7. ,Hi, (VS2008, VB.Net
I used the above code,

View Tutorial          By: Pat at 2012-06-27 17:30:37

8. clear concept explanation..
View Tutorial          By: ASHOK at 2013-01-16 07:31:35

9. realy i enjoy it for visit your site. and i unders
View Tutorial          By: vinod balot at 2015-02-09 17:43:30

10. how to connect jdbc in java on mysql
View Tutorial          By: naseem at 2011-10-26 19:26:45