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 is a parameter used for?
What is floor math?
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
What is member in java?
Why is logger singleton?
What is the largest data type in java?
where u use Abstraction and Interface in real time
Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.
what are upcasting and downcasting?
What is the use of singleton class?
can any body tell me? does advance java and j2ee both are same.
Explain how to convert any java object into byte array.