Practice mode Java

Which Java feature is resolved at run time using the actual class of the object?

Correct answer A. Overriding of instance methods

Explanation

A call to an overridden instance method is dispatched at run time according to the class of the object itself, which is the basis of polymorphism. Overload selection happens at compile time using the declared argument types. Field access and static method calls are also fixed at compile time by the static type of the expression.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.