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. hello
i am developing a budget application

View Tutorial          By: anu at 2010-04-16 04:26:36

2. nice work.......
View Tutorial          By: sukirti at 2011-05-06 16:30:19

3. Great! Thanks :)
View Tutorial          By: Shivang at 2010-10-10 11:53:54

4. dat is wat i want to jegay with you ,......dats ko
View Tutorial          By: dorji wangmo at 2011-12-27 05:38:35

5. pLZ LET US FIND SOME PROGRAMS INVOLVING CONVERSION
View Tutorial          By: Ishaq at 2009-02-12 00:27:59

6. protected void finalize() {
System.out.pr

View Tutorial          By: Gan at 2011-07-11 12:08:24

7. Thanks for everything... I'm greeting you from Aze
View Tutorial          By: Shahriyar at 2011-04-28 15:54:14

8. good one
View Tutorial          By: vij at 2009-06-03 16:00:12

9. does this code work with netbeans. if not can anyo
View Tutorial          By: Alton at 2010-04-02 22:36:57

10. i get error like this :
The requested resou

View Tutorial          By: Vera Yunita at 2013-05-20 03:57:18