when to use abstract class and when to use interface?

Answer Posted / devarathnam c,kotagudibanda(po

Hi...
When u want to inherit the properties of base class only
(not other resources) go for Abstract class.
When u want to inherit the properties of base class and
other resources go for Interfaces .

Is This Answer Correct ?    42 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between jfc & wfc?

599


What are inner classes or non static nested classes in java?

707


What is 16 bits called?

502


Explain the inheritance?

577


Highest level event class of the event-delegation model?

3505






Are private methods final?

488


Where we write javascript code in html page?

563


How do you represent a space in regex java?

524


Difference between linkedlist and arraylist.

592


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

555


Is there any case when finally will not be executed?

527


Variable of the boolean type is automatically initialized as?

596


Can we have any other return type than void for main method?

540


Why do we need wrapper class?

536


Explain about the main() method in java?

569