| |
GeekInterview.com > Interview Questions > J2EE > Core Java
| Print | |
Question: Usage of Abstract class and Interfaces
Answer: In Real time when we go for Abstract classes and when we go for Interfaces |
| August 08, 2008 07:03:54 |
#3 |
| sangamesh32 |
Member Since: August 2008 Total Comments: 3 |
RE: Usage of Abstract class and Interfaces |
Abstract class means partial implementation which means he cannot directly use properties of this class i.e he has to inherit it and use the class and also allowed to provide extra properties. One real time use of abstract class is it can be used as a Adapter class.
Interfaces are open for implementation, to use interfaces he has to provide implementaion to all methods. i.e interfaces are just specification which states what to do not how they are done. |
| |
Back To Question | |