In real time project when will we use Abstract class. and
what are the difference between abstract and interface.

Answer Posted / gopi

abstract class means--it has atmost one abstract
method.remaining might be abstract or not.

interface means ---it has almostall abstract methods.u have
only the method specification.

In real time if u want to share the some common features in
the abstract class u have to extends the abstract class.
so, u need not wrote the body to the all the methods.
if u implement interface u should write body to the all
the methods.

Is This Answer Correct ?    12 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if the static modifier is removed from the signature of the main method?

685


Which class is the immediate superclass of the menucomponent class?

607


How is a java object message delivered to a non-java client?

563


What is chat area? Explain.

548


What is the purpose of the notify() method?

587






What is synchronization and why is it important?

532


How can I avoid validating a form before data is entered?

543


What is RMI and what are the services in RMI?

597


What are the different algorithms used for clustering?

537


What is a sessionfactory? Is it a thread-safe object?

664


Write a program to show synchronization?

677


When is the best time to validate input?

591


Do I need to import javlang package any time? Why ?

616


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

1705


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

559