| |
GeekInterview.com > Placement Papers > HP (Hewlett-Packard) > Technical
| Print | |
Question: What are interfaces, abstract classes. What is their purpose and differences ?
|
| July 07, 2009 11:14:35 |
#4 |
| kolanchinathan.e |
Member Since: July 2009 Total Comments: 1 |
RE: What are interfaces, abstract classes. What is their purpose and differences ? |
Interface (behaviour) is same as class they have numerous of variable and methods.
All methods which have interface is abstract methods.
Abstract class is class this is partial implementation gap for sub class implementation.
Abstract class may have abstract methods and concrete methods.
When radical change of behaviour without changing object is adopted then
interface is used.
When default behaviour adopted in your system, at that time abstract class is very useful. |
| |
Back To Question | |