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
What is jit and its use?
What is arraylist e in java?
What are the two environment variables that must be set in order to run any java programs?
What is the history of java?
What is polymorphism and what are the types of it?
How does thread synchronization occurs inside a monitor?
Can we declare a class as abstract without having any abstract method?
Can a constructor call the constructor of parent class?
What is a classloader in java?
What do you mean by jjs in java8?
What is the size of a string in java?
What is meant by class loader? How many types are there? When will we use them?
What is flag in java?
What is java algorithm?
Explain the difference between abstraction and encapsulation.