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

What are green threads in java?

749


What are the two types of java?

756


Are arrays classes in java?

745


What is anagram number?

652


what is a working thread? : Java thread

800


When is the finalize() called?

910


Implement a stack with push (), pop() and min() in O(1) time.

824


Can I override protected method in java?

806


Can we able to pass objects as an arguments in java?

779


What is the difference between variable & constant?

767


Where are the local variables stored?

763


Is java 1.7 the same as java 7?

792


Is it possible to override the main method?

732


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

760


What is included in core java?

818