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. Looks like when I uninstall an app it should be un
View Tutorial          By: Danila Piatov at 2011-05-18 12:03:53

2. thats good. but not for the begineers. because in
View Tutorial          By: jaywant topno at 2009-10-31 10:05:43

3. string is immutable in java.String buffer is mutab
View Tutorial          By: krishnakumar at 2009-10-19 00:35:44

4. my code is unable to open included files
ho

View Tutorial          By: MANAS at 2013-09-08 05:44:46

5. Awesome code workings fro me thank you so much :)
View Tutorial          By: Shripad at 2012-01-24 08:58:03

6. crystal clear explanation. He's explained very nic
View Tutorial          By: jay at 2009-12-08 10:28:14

7. i should say, a lot of thank you because of this s
View Tutorial          By: merven at 2009-03-17 09:45:39

8. At my phone number, it showing

5 re

View Tutorial          By: Zafar Iqbal at 2013-04-02 19:48:32

9. The code for CharArrayReader is not working. So, w
View Tutorial          By: Maya Joshi at 2012-06-23 14:30:26

10. This is by far the easiest way I have yet seem, ma
View Tutorial          By: doahh at 2010-03-08 11:23:48