When should I use abstract classes and when should I use
interfaces?
Answers were Sorted based on User's Feedback
Answer / ved.b.tripathi
Interface : when you about to maintain the standard through
out the application then,blindly go with the interface.
Abstract : when you customize the behavior but still want to
maintain some standard then use abstract,because in abstract
you can have non abstract method that will be use by every
class that extend this abstract method and that class also
have to give the body of abstract methods(standard).
| Is This Answer Correct ? | 15 Yes | 2 No |
What are data types in programming?
What is the lifetime and scope of a variable?
How many Java environments are there?
1 Answers Phantom Technologies,
Which language is java?
What are different data types?
using equals method overriding which objects are compared?i.e same class objects or other class objects?Explain me.
What do you mean by collectors in java 8?
What is constructor chaining in java?
real time example for deadlock,starvation,livelock
Diff between C++ and java?
What do you understand by the bean persistent property?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?