when to for abstract class and when to go for interface

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many static init can you have?

691


What are classloaders?

601


Which is better singleton or static class?

517


What is meant by oops concept in java?

508


What is a databasemetadata?

557






Does java have a compiler?

561


Can we serialize static variables in java?

657


What is console based application in java?

548


What is the use of System class?

614


What methods are used to get and set the text label displayed by a button object?

561


What is the benefit of inner / nested classes ?

529


What is object-oriented paradigm?

623


Explain the concept of proper inheritance?

625


What is the syntax and characteristics of a lambda expression?

563


What is return data type?

563