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. Having this error while using comm.jsr for sending
View Tutorial          By: Amit Kumar at 2013-10-15 09:04:58

2. Thanks, it worked.
View Tutorial          By: Deepak Varier at 2009-08-19 03:38:07

3. great material for language bugs....
View Tutorial          By: manoj kapri at 2009-11-30 00:30:13

4. Controlling Page Navigation in JSF - Static and Dy
View Tutorial          By: chip at 2010-10-07 05:16:14

5. Tnx. Very fast learning i think.
Just make

View Tutorial          By: mahdi at 2011-07-09 20:20:39

6. Very nice tutorial :)

I have teste

View Tutorial          By: yannoo95170 at 2015-06-18 00:30:26

7. Please note that the above code does not work with
View Tutorial          By: mk at 2012-02-15 10:59:49

8. Hi there,
this doesnt work in IE7 or firefo

View Tutorial          By: Gerrard at 2009-10-17 15:19:24

9. java.lang.NoSuchMethodError: main

<

View Tutorial          By: mark at 2010-09-27 03:46:48

10. This site is sufficient for learning the programmi
View Tutorial          By: Shaheryar Khlaid at 2011-07-25 20:36:01