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 == mean?

767


What is java util function?

743


What is off heap memory?

763


What is class and object in java?

777


Why are there no global variables in java?

817


How do you clear a list in java?

831


What is difference between module and function?

786


Tell me how many ways are there to initialise an integer with a constant.

896


What is the program development process?

760


Is alive and join method in java?

787


Which class is the superclass for all the classes?

786


Which software is used for java programming?

789


What is ascii format?

779


Is 0 an irrational number?

835


What is the length of a string?

763