when to use abstract class and when to use interface?

Answer Posted / arvind

If you have to implement all of the fuctionalities provided
by, then in this case you should use interfaces because
they force you to implement all of the methods.

on the other hand if you think you have to imlement few of
them , then better you use abstract class.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the exclamation mark mean in java?

606


Explain about collection interface in java?

562


What is the exact difference in between unicast and multicast object? Where we will use?

568


What data structures are used to perform recursion?

612


What are constants?

613






What is an object class?

572


Does chrome use java?

529


Are arrays passed by reference in java?

500


why Interface used?

545


Is array an object in java?

560


how can you take care of mutual exclusion using java threads? : Java thread

621


What is the difference between jfc & wfc?

605


What are sets in java?

517


What is object-oriented programming?

583


What are the actions that can occur when a thread enters blocked state?

591