Why should I declare a class as an abstract class?
Posted
by
Pied Piper
on Programmers
See other posts from Programmers
or by Pied Piper
Published on 2011-07-29T08:59:47Z
Indexed on
2012/10/12
21:48 UTC
Read the original article
Hit count: 279
I know the syntax, rules applied to abstract class and I want know usage of an abstract class
Abstract class can not be instantiated directly but can be extended by other class
What is the advantage of doing so?
How it is different from an Interface?
I know that one class can implement multiple interfaces but can only extend one abstract class. Is that only difference between an interface and an abstract class?
I am aware about usage of an Interface. I have learned that from Event delegation model of AWT in Java.
In which situations I should declare class as an abstract class? What is benefits of that?
© Programmers or respective owner