when to for abstract class and when to go for interface

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Are static members inherited to sub classes?

638


What is the use of inner class?

541


Why are parameters used in functions?

527


What is data type in java?

485


If a variable is declared as private, where may the variable be accessed?

547






Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

537


Give a practical example of singleton class usage?

591


What is the difference between a vector & an array list?

674


What is the original name of java?

540


What is unsigned char?

612


What are voids?

530


How do you escape sequences in java?

588


What is parameters example?

549


What is the use of a conditional inclusion statement in Java ?

586


Is an array a vector?

550