When we will use an Interface and Abstract class?

Answer Posted / abc

interface is used when we want all the methods implement
the methods differnetly in different situations.


Abstract class
We also use abstract classes to override the
abstract methods that it contains.Otherwise the child class
will mentioned as abstract.

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when you will synchronize a piece of your code? : Java thread

529


Explain the difference between association, aggregation and inheritance relationships.

557


Define an applet in java?

632


Can we extend singleton class?

527


What's the purpose of using break in each case of switch statement?

514






What is the difference between Error, defect,fault, failure and mistake?

660


Explain restrictions on using enum?

633


Explain the advantages of packages in java?

517


What is meant by 'Class access modifiers'?

554


Is main an identifier?

546


Explain the public class modifier?

505


String class is defined under which package in java?

625


What is variable length arguments in java?

518


Differentiate between stringbuffer and stringbuilder in java.

552


In a container there are 5 components. I want to display all the component names, how will you do that?

1560