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. Typecasting concept helped me alot in solving my p
View Tutorial          By: Arun at 2010-09-02 00:23:38

2. any body who have a full source code of the progra
View Tutorial          By: progra at 2013-02-11 12:37:34

3. Nice one for jsp learners.
View Tutorial          By: Vignesh at 2011-07-14 04:04:55

4. you have extended class Abc within class Abc

View Tutorial          By: SUNIL SHAH at 2012-05-25 06:17:23

5. Hi,
Even if the while loops (in Producer an

View Tutorial          By: Pranay at 2012-09-19 19:08:45

6. Hi,
What should be done to correct the erro

View Tutorial          By: Raymond at 2011-03-07 08:51:54

7. I'm sorry but your closing statement...

View Tutorial          By: Al Scherer at 2009-09-15 09:33:24

8. can i using stack in microsoft access 2007
View Tutorial          By: pxin at 2015-03-24 05:45:56

9. sir,i m doing ME/CSE.i want to know more informati
View Tutorial          By: m.rajalakshmi at 2011-07-27 05:20:44

10. very good example and explanation. This kind of p
View Tutorial          By: jagdish at 2011-07-03 15:15:02