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. Reading the above comments and questions I have my
View Tutorial          By: running on toaster at 2013-04-23 02:20:43

2. voire pluse a des command java
View Tutorial          By: lahcine moubarek at 2009-02-16 01:59:17

3. Brief but Comprehensive. Excellent Effort.
View Tutorial          By: Farooq at 2011-11-16 14:14:52

4. any one can send serial port communication using n
View Tutorial          By: prakash at 2013-07-01 15:44:48

5. hi friends thank you very much for the code but th
View Tutorial          By: Surya at 2008-06-13 07:06:07

6. This post is about adding an application icon to a
View Tutorial          By: Rick at 2011-11-04 16:48:16

7. This is not an easy example for begineer, please t
View Tutorial          By: Arif Islam Nayan at 2009-12-16 08:24:57

8. It is simple and clear.. Thnx.
View Tutorial          By: kiru at 2010-04-06 01:48:04

9. to know
View Tutorial          By: Parthasarathi.N at 2010-02-19 05:59:51

10. i want a java code to make a GUI in netbeans and s
View Tutorial          By: siddharth at 2012-03-17 09:59:59