Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Originally posted by Nalini Reddy:
Hi Vijay,
I read an abstract class even without having any abstract method can be called abstract.
Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Originally posted by Nalini Reddy:
If the class is empty, is it that it has no subclass or the subclass can have any methods with their own implementation.
Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Originally posted by Vijayendra V Rao:
But when you add a concrete method, you will have to declare it to be a normal class...you can no longer have it as an abstract class.
42
Originally posted by Jeroen Wenting:
incorrect.
When you have ANY abstract methods a class MUST be declared abstract.
When you have none, the class still MAY be declared abstract (this is why you can declare a class with no methods abstract...).
Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Originally posted by Vijayendra V Rao:
Did I mean something else? Could you please refer to my earlier posts? You have just put my words in another way...thats all
But when you add a concrete method, you will have to declare it to be a normal class...you can no longer have it as an abstract class.
42
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mike Gershman
SCJP 1.4, SCWCD in process
Harish
SCJP ,SCDJWS
Originally posted by Harish Vembu:
But could we extend this thread by asking one more question as what exactly would be the difference between an abstract class and interface in Java?.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mike Gershman
SCJP 1.4, SCWCD in process
Harish
SCJP ,SCDJWS
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|