What is the difference between Abstract Class and Interface

Answer Posted / ravi

1.A programmer creates abstract class when there are some
common features shared by all the objects.
A programmer writes an interface when all the features
should be implemented differently for different objects.

2.When an abstract class is written the programmer should
provide sub classes to it.
A programmer writes an interface when he wants to leave
implemntation classes to third party vendors.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the vector class in java programming?

561


What is OOP's Terms with explanation?

598


When we should use serialization?

560


is it possible to instantiate the math class?

522


What is multiple inheritance? Is it supported by java?

520






Why static functions are used?

563


What are the loops in java?

518


Which class cannot be a subclass in java?

537


Explain about varargs in java?

576


What is arrays aslist in java?

513


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

593


What is implicit object in java?

543


What is the use of volatile in java?

594


What are the special characters?

531


Explain the importance of import keyword in java?

519