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
Difference between this() and super() in java ?
What is difference between calling start() and run() method of thread?
How do you compare arrays in java?
What is string example?
What do you mean by Hash Map and Hash Table?
What is the vector class in java programming?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
Why java does not support pointers?
Can a class be private in java?
What is formatted output?
What is difference between equals and hashcode method?
State some advantages of java?
What does provide mean construction?
Explain reverse a linked list iterative solution in java?
Why is a singleton bad?