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

What's the purpose of static methods and static variables?

830


Which is better singleton or static class?

717


How many decimal places is a double?

751


Is arraylist dynamic in java?

736


If a class is declared without any access modifiers, where may the class be accessed in java programming?

919


Write a program to reverse a number in java?

813


Can we have multiple public classes in a java source file?

803


What is native method in java?

803


What is the default value of local and global variables?

855


Is java still necessary?

848


What are white spaces in java?

769


What is the static block?

812


What do you understand by access specifiers in Java?

812


What is immutable class in java?

720


What are the different types of data structures in java?

756