KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm curious as to why abstract methods MUST be overridden by the first concrete implementing class, and not one further down the hierarchy change. I'm not suggesting I want to do this, but I'm curious as to why it has to be the first class Consider this example abstract class Upper { abstract void doSomething(); } class Middle extends Upper { void doSomething() { // I'm forced to be implemented here } } abstract class Lower extends Middle { } class Bottom extends Lower { void doSomething() { // I'm valid, but I'm too far down the hierarchy } }
Tags (comma-separated)
Save Edits
Cancel