intermediateCore Java Fundamentals144 of 436
What is abstraction? Explain with a real-world/project example. When would you use an abstract class instead of a normal class?
Tests whether you can justify an abstract class choice concretely -- when you want to share common state or partial implementation across subtypes while still forcing them to fill in specific behavior -- rather than defaulting to abstract classes out of habit when a normal class with composition would do.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response