In real time project when will we use Abstract class. and
what are the difference between abstract and interface.
Answer Posted / aravind
Depending upon the requirement.
Abstract class---->it contains zero or more abstract methods.
ex HttpServlet and GenericServlet
HttpServlet contains all sre concrete methods but it
declared as a Abstract class.
InterFace--->It contains all abstract methods.
if we extends the abstract class .there is chance to extend
another class.
if we implements the interface we can extends another class
| Is This Answer Correct ? | 17 Yes | 5 No |
Post New Answer View All Answers
Explain about local interfaces.
What does module-relative mean?
What is the purpose of the wait(), notify(), and notifyall() methods?
Explain what is orm?
What are the benefits of detached objects?
whats is mean by tiles in struts
What is the RMI and Socket?
Why do threads block on i/o?
How to implement RMI in Java?
Explain the difference between object state and behavior?
What is the purpose of the notify() method?
Difference between swing and awt?
What is a policy?
What are transaction attributes?
Why do I get a duplicate name error when loading a jar file?