When we will use an Interface and Abstract class?

Answer Posted / basireddy

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 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why Interface used?

539


Difference between current previous versions of Java?

557


What does flagged out mean?

574


What are the restrictions imposed on method overriding?

556


What is the default execution method in java?

624






What do you mean by boolean?

580


What is difference between fail-fast and fail-safe?

588


What does isempty () do in java?

605


What is singleton class in java and how can we make a class singleton?

574


Which collection is thread safe in java?

509


Why volatile is used in java?

532


Explain how can you debug the Java code?

592


What is a boolean structure?

559


What is the full name of java?

571


What are pass by reference and pass by value?

529