When we will use an Interface and Abstract class?

Answer Posted / ravikiran

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

where as an abstract classis used to define abstarct as
well as non abstract methods

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to instantiate the abstract class?

738


What is java oops?

777


What is the benefit of abstract class?

712


What is the difference between integer parseint and integer valueof?

765


What is the difference between compile-time polymorphism and runtime polymorphism?

775


Which is best ide for java?

784


What are packages in java?

896


What is size () in java?

819


Is there is any difference between a scrollbar and a scrollpane?

765


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

774


What is public static?

744


What are extraneous variables examples?

748


State the main difference between c++ and java?

801


What is the difference between quicksort & mergesort? When should they be used? What is their running time?

842


What is the formula to calculate percentage?

753