What are the design considerations while making a choice between using interface and abstract class?
Answer / Rakesh Kumar Gupta
When choosing between an interface and an abstract class, consider the following factors:
1. Interfaces promote programming to interfaces rather than implementation classes, making it easier to change or reuse code.
2. Abstract classes can have instance variables and default implementations for methods, whereas interfaces cannot.
3. Interfaces are less verbose but more flexible, while abstract classes offer a compromise between flexibility and complexity.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is synchronization and why is it important?
wahts is mean by dynavalidatorform in struts/
What are the types of data passing mechanisams under JMS specification?
What is the difference between a menuitem and a checkboxmenuitem?
What method is invoked to cause an object to begin executing as a separate thread?
What do you know about seam?
What are various types of class loaders used by jvm?
what is an isolation level?
In a multitiered application which tier is the browser in?
What is message driven beam?
How many ways can a thread be used?
What is a clone?