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

How many bytes is a unicode character?

510


What is unicode full form?

556


What is the difference between state-based unit testing and interaction-based unit testing?

495


Why enumeration is faster than iterator?

531


How to restrict a member of a class from inheriting by its sub classes?

805






which pattern is default in scanner package?

1803


What is generic type?

574


Explain OOPs concept.

653


What are the 4 types of research methods?

515


What is files manifesting?

1734


If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

714


What does those terms actually mean included in the j.d.k i.6?

1608


What is the maximum size of hashmap in java?

540


What is final keyword in java?

557


What is method overloading and method overriding?

538