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. Those who want the details of JAVA should search f
View Tutorial          By: Amit Singh at 2011-11-13 11:42:42

2. how to multiply 2.54*0.7071 using only bitwise ope
View Tutorial          By: vindya at 2012-01-12 07:23:08

3. sir, i want if,if else,nested if..... concept in o
View Tutorial          By: krishna at 2015-08-14 08:58:01

4. This tutorial is very nice for beginners.
View Tutorial          By: Wakil Ahamad at 2009-02-07 05:58:31

5. thank you sir
View Tutorial          By: ramya at 2010-01-11 00:42:05

6. If I want to read input from A PDF what should I d
View Tutorial          By: thiru at 2015-08-12 10:57:51

7. This tutorial is really fantastic.It helped me a l
View Tutorial          By: Rakesh Verma at 2008-06-25 13:25:23

8. very informative and hope it will give some more d
View Tutorial          By: mmt at 2009-12-16 02:16:45

9. very thanks... It's very useful to me...
Th

View Tutorial          By: swathi. M at 2015-01-02 16:32:19

10. when I exported the data to excel there is a value
View Tutorial          By: mizhelle at 2015-10-10 13:17:56