GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Programming  >  Java

 Print  |  
Question:   What is the difference between abstract class & Interface.



July 07, 2005 07:31:14 #1
 arunapratap_k   Member Since: Visitor    Total Comments: N/A 

RE: What is the difference between abstract class & Interface.
 
ABSTRACT CLASS contains general methods aswell as abstract methods whereas INTERFACE contains only abstract methods. 
A programmer uses Abstract class to specify the common features of all objects 
and abstract methods when the methods have diff. implementations for diff. objs. 
he himself writes the classes implementing abstact methods. 
A programmer writes an Interface when he doesn't know how to implement the features of a s/w and he leaves the implementation to be provided by 3rd party vendors
     

 

Back To Question