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 an integer an object?

745


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

848


Explain tree set and its features?

832


Difference between nested and inner classes ?

828


Are arrays classes in java?

756


What is a parameter used for?

749


What is primitive array?

700


What is preflight request?

744


What is the generic class?

724


What is equlas() and hashcode() contract in java? Where does it used?

843


What do you understand by classes in java?

792


Explain about object oriented programming and its features?

819


What is variable and rules of variable?

779


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

772


How do you implement singleton class?

772