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



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 can send 4 or 5 sms per mnt..is there any wa
View Tutorial          By: rahul at 2011-02-11 00:17:51

2. Hi, I have the following element:

&

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

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

4. hello everyone

i want to implement

View Tutorial          By: Prateek at 2010-09-05 00:40:57

5. Hi, thanks alot this code works for me , can someo
View Tutorial          By: ann at 2011-03-18 04:50:16

6. sample program in packages and interface combined
View Tutorial          By: priya at 2009-09-10 05:42:31

7. Hi ngocanh, You are right. The client has to be in
View Tutorial          By: Emiley J at 2013-07-14 05:51:35

8. This example really works and help a lot me to dis
View Tutorial          By: Monu Kumar at 2010-03-30 09:26:23

9. HI.KEEP ME ON WORK I HAVE MASTER PROGRAMMING C++ <
View Tutorial          By: NINHNGUYEN at 2011-06-19 12:54:20

10. very very thankssssssssssssssss
View Tutorial          By: gowtham at 2010-07-31 22:58:36