when to use abstract class and when to use interface?
Answer Posted / muthusenthil
Abstract(patially implemented) class can be used as a
common base class for an application it has all property of
class except it cannot be instantiated.it provide default
behavior.
interface is mearly a specification,nothing implemented for
any standalone project which can be changed at will its
more design flexible and it can be utilized to model
multipleinheritance.
Is This Answer Correct ? | 56 Yes | 30 No |
Post New Answer View All Answers
Can a class declared as private be accessed outside it’s package?
Explain java coding standards for methods?
What is collection class in java? List down its methods and interfaces.
What is the difference between object oriented programming language and object based programming language?
Why object class is super class for every class in java?
What is array length in java?
Why is a string immutable?
What is method overloading in java ?
What is an infinite loop? How infinite loop is declared?
Does java support multiple inheritance or not?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Compare java and python.
What is int argc char * argv?
How do you create a reference in java?
Is sizeof a preprocessor?