Microsoft Interview Question
Software Engineer in TestsAn abstract class may contain implementation of some functions ( not all ).
An interface can never contain implementation of any function
abstract class : abstarct class means any method can be just declared not nee to define that method but for all the methods its not necessary meeans there can be many methods which can be defined and many which are just declared and for varibl;es u can define varibles as u like
interface : in case4 of the Interface u can only declare the prototype of the method
u cant define any method in the body of the interface.and for varibles definition u can just define constant here not a varible
means a static final type something
You can implement multiple interfaces but extend only one class (abstract or not). An abstract class can have data members, constructors, methods with bodies, ..etc. It's your typical class except that it can't be instantiated.
- Anonymous July 28, 2009