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
zishan.infoapps@gmail.com

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



Ask a Question

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. Hi, I have the following element:

&

View Tutorial          By: gardek at 2009-09-02 14:40:37

2. After edit tomcat-user file and restart sevice ..i
View Tutorial          By: Rajesh Perumal at 2013-01-08 06:29:21

3. it is very very use full to us
View Tutorial          By: santhosh at 2008-12-07 14:46:13

4. Thank you so much Eric Giguere.
You save me

View Tutorial          By: ijAcK D at 2009-10-18 05:02:48

5. hai,
i want to know how the connect

View Tutorial          By: V.Selvi at 2010-02-28 21:01:33

6. Where to put the smsc number. I am using vodafone
View Tutorial          By: gopi at 2009-06-11 22:07:49

7. THANX FOR THE INFO....
View Tutorial          By: Abhinaykumar at 2010-07-06 11:34:53

8. MySQL Connector/J supports only TCP/IP connections
View Tutorial          By: Java Training Institute In Chennai at 2012-09-13 12:37:44

9. sir i want how to write record into file and readi
View Tutorial          By: himasekhar at 2013-05-25 10:38:31

10. clearly explained the pgm logic....
thnx...

View Tutorial          By: Akshaya at 2011-11-24 04:12:36