When should I use abstract classes and when should I use
interfaces?
Answer Posted / ankit
if u r required more than 1 class in ur prog then use
interface because u cant extends 2 class in ur prog ...to
use 2 class in ur prog u can implement 1 interface and
extends 1 class
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
What is parsing a sentence?
What is singleton class in ruby?
What is mean by encoding?
What is the difference between serializable and externalizable interfaces?
how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)
How do you read a char in java?
What is java used for on a computer?
What is boolean logic?
Can extern variables be initialized?
What is a finally block?
What is an immutable object?
When to use runnable interface vs thread class in java?
How to sort numbers in java without array?
Can list have duplicates in java?