問題文
A subclass declares a method that is meant to replace the behavior of one in its superclass, and the author writes the annotation for overriding above it. What does that annotation change?
選択肢
- It suppresses the warning that appears whenever a class hides a method that its own superclass has declared
- It causes the method to override the inherited one, because a method with the same name would otherwise be treated as an overload of it
- It marks the method so that the runtime dispatches to it dynamically, which an inherited method needs in order to behave polymorphically
- It asks the compiler to check that a matching method really is inherited, and it changes nothing while the program runs