I have a class which is abstract which contains only the
abstract methods. This is similar to an interface. Then, if
i have given a choice to choose one of them. Which one i
have to choose and why?
Answer Posted / ashoka
Better to choose Abstract class. Because it contains not
only the abstract methods but also implemented methods but
in interfaces only unimplemented methods will be there and
all final variables will be there.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Which is dependent variable?
Can a class be declared as protected?
Difference between linkedlist and arraylist.
Is oracle charging for java?
What is sorting in java?
Which collection is best for sorting in java?
Can we use a switch statement with strings?
What is unicode full form?
Define jre i.e. Java runtime environment?
What 5 doubled?
What are loops in java? What are three types of loops?
What is the difference between multiple processes and multiple threads?
What is the final method?
Can we instantiate interface in java?
Does importing a package imports its sub-packages as well in java?