Comment on Tutorial - Abstract classes in Java By Kamini



Comment Added by : zishan

Comment Added at : 2010-05-20 00:21:46

Comment on Tutorial : Abstract classes in Java By Kamini
that was gud example to explain abstract. i have doubt.....
here is one program which has 1 abstract class without abstract method. its also works fine.
Then what the use of abstract class, any how it does not allow to create objects, we can use this with concrete class to implement method defined in abstract class which we have to extend the abstract class then why not directly in concrete class why need of abstract class.
can anyone explain this point. mail me plz
[email protected]

abstract class demo {
public void show() {
System.out.println("not abstract method");
}
// public abstract void display();
}
class demo1 extends demo {
public void display() {
System.out.println("abstract method");
}}

class program {
public static void main(String args[]) {
demo d = new demo1();
d.show();
d.display();
//d.display1();
}
}


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. realy very nice artical it give good understable
View Tutorial          By: vivek at 2009-06-19 01:27:46

2. Amazing tutorial!! This is what I was exactly look
View Tutorial          By: Sumanth Vaidya at 2015-06-17 18:19:16

3. HI Friends,

I am new to java and i

View Tutorial          By: Srini at 2015-04-05 17:00:58

4. It seems author has half knowlage
EJB main

View Tutorial          By: Aryan Siddharth Singh Gautam at 2010-03-22 03:40:11

5. Hi All........
People those who are ge

View Tutorial          By: Abhijit at 2013-05-28 11:24:24

6. hello,
i have running my bca IIIrd Year &a

View Tutorial          By: Narpat Dewasi at 2013-07-05 10:49:47

7. Hi ! do u know have use FileOutputStream in Surfac
View Tutorial          By: lukas at 2011-07-18 16:55:20

8. Hi All,

This SMS code is working fi

View Tutorial          By: Munavar at 2008-01-27 22:53:31

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

10. I dont want my client using my application to do a
View Tutorial          By: zaffa at 2011-07-27 06:52:09