when to use abstract class and when to use interface?

Answer Posted / brijendra kumar soni(xavient)

1-By using Interface we can achieve the Multiple
inheritence while by using abstract class we can not
achieve.

2-Abstract Class extended by a class only while Interface
implmented by a class and extended to one or more
interfaces.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the five major types of reference sources?

543


What is a Presistent Object?

647


Are registers volatile?

536


What is javac_g?

592


Explain the overview of UDP messaging.

737






What is a constructor overloading in java?

529


Explain the term virtual machine?

592


What is difference between iterator and enumeration in java?

527


Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain

1438


What is final class?

578


What is keyword in oop?

525


What are kinds of processors?

571


Why singleton class is used in java?

576


How to perform selection sort in java?

588


Can a singleton class be inherited?

532