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


Please Help Members By Posting Answers For Below Questions

How can I scroll through list of pages like the search results in google?

573


What are externizable interface?

588


What is a clone?

576


When is the best time to validate input?

609


What is the infobus?

614






What are JTA/JTS and how they used by client?

1720


What’s jboss jbpm?

584


the same information whether it will connect to the database or it will be used previous information?

577


Name the eight primitive java types.

601


How to deploy Jar, War files in J2EE?

2174


What is the relationship between local interfaces and container-managed relationships?

596


Is jvm a overhead?

630


What is the RMI and Socket?

627


Can I use javascript to submit a form?

616


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1644