| |
GeekInterview.com > Interview Questions > J2EE > Java
| Print | |
Question: What is the difference between Abstract class and Interface
Answer: Answered by Scott on 2005-05-12 10:03:06: An abstract class can contain non-abstract methods which do not have to be overridden in the subclass. There is no difference between a fully abstract class (all methods declared as abstract and all fields are public static final) and an interface. |
| April 04, 2007 13:40:59 |
#12 |
| Palanisami |
Member Since: Visitor Total Comments: N/A |
RE: What is the difference between Abstract class and ... |
1. Abstract Class may contains constructor but interface does not contain constructor.
2.By default, all variables in interfaces are static and final,then we can't declare method as final.
3.In Interface all methods shuld be public but mot in abstract class.
4.interface supportes multiple inheritance but abstract class does not support.
5.we should initialise variables in interface but not necessory in abstract class. |
| |
Back To Question | |