Given the following code, which combination of access modifiers
can legally be placed before aMethod()
on line 3 and be placed before aMethod()
on line 8?
1. class SuperDuper 2. { 3. void aMethod() { } 4. } 5. 6. class Sub extends SuperDuper 7. { 8. void aMethod() { } 9. }
D.
A method may not be overridden to be more private.
All choices except D make the access of the overriding method more private.