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
Can a source file contain more than one class declaration?
Is set ordered in java?
what is nested class in java?
How do you write a conditional statement?
What is difference between this and super keyword?
What is the difference between compile-time polymorphism and runtime polymorphism?
Explain oops concepts in detail?
What is array list in java?
Where are variables stored?
What is the difference between actual and formal parameters?
What do you understand by casting in java language?
What is numel matlab?
What is the use of conditional statement?
Define nashorn in java8.
In a class implementing an interface, can we change the value of any variable defined in the interface?