CS 121 Chapter Notes - Chapter 10: Compile Time, Social Security Number

54 views7 pages

Document Summary

Polymorphic reference: a reference variable that can refer to different types of objects at different points in time. The specific method invoked through a polymorphic reference can change from one invocation to the next: ex: obj. doit(); If the reference obj is polymorphic, it can refer to different types off objects at different times. So, if the line of code is a loop, or if it it"s in a method that is called more than once, it could call a different version of the doit method each time it is invoked. At some point, the commitment is made to execute certain code to carry out a method invocation. Commitment is referred to as binding a method invocation to a method definition. In many situations, the binding of a method invocation to a method definition can occur at compile time. For polymorphic references, the decision cannot be made until run time.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions