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. this really helps me alot :)
View Tutorial          By: liezl at 2014-08-08 13:38:58

2. Nice explanation.But please explain left shift an
View Tutorial          By: Ramesh Kanagaraj at 2013-03-28 14:27:30

3. A phone is considered a good phone if all of the f
View Tutorial          By: harish at 2012-12-24 06:59:04

4. Managing several submissions can be a lot more sim
View Tutorial          By: Curran Cline at 2012-12-18 05:43:44

5. this tutorial is very nice but if it contains more
View Tutorial          By: JOHN.J at 2007-11-29 23:56:06

6. Hi Chriz,
Yes it should work on any site. B

View Tutorial          By: William at 2010-07-10 20:54:24

7. Hi Rahul,How to run this program kindly send me th
View Tutorial          By: Das at 2008-09-04 00:53:02

8. Very good explanation but i need to know how the c
View Tutorial          By: surender at 2011-11-17 11:15:22

9. hii
my crys rpt is nt generating bill, it i

View Tutorial          By: Afan Khan at 2012-04-05 16:48:40

10. It will be better, if you expalin by examples codi
View Tutorial          By: Parwez at 2012-06-18 08:03:45