when to for abstract class and when to go for interface

Answers were Sorted based on User's Feedback



when to for abstract class and when to go for interface..

Answer / sumit kumar

if your class design have some common and some different
behavior then go for - abstract class
if your class design have only different behavior then go
for interface.

Is This Answer Correct ?    12 Yes 2 No

when to for abstract class and when to go for interface..

Answer / chandra d

If your class design has multiple implementations then we
can go for Interface.
if your class design is having some specific features and
some other features may change .. then we can go for
Abstract class

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?

2 Answers  


Can you make an instance of an abstract class?

5 Answers   Accenture,


What is a parameter example?

0 Answers  


What is the purpose of the File class?

3 Answers  


What are the Abstract Classes provided by Java?

5 Answers   Oracle,


Give me some null interfaces in java?

0 Answers  


What is a class component?

0 Answers  


When try and catch block is used ?

6 Answers  


Write a factorial program using recursion in java?

0 Answers  


What is balanced tree in java?

0 Answers  


whats is the use of final,in which situation final can be used in the application?

2 Answers   DNS,


What is the difference between throw and throws? What is the similarity between try and throw?

2 Answers  


Categories