adspace
Give any criteria when you use an abstract class and an interface?
Answer Posted / Anurag Choubey
1. Abstract Classes are used when you want to enforce a common behavior across all subclasses but also allow for implementation differences. They can contain both abstract and concrete methods. 2. Interfaces are used when you want to define a contract or set of methods that classes should implement, without providing any implementation. Multiple classes can implement the same interface.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category