A good answer might be:No---just one could have be used for each object in succession (assuming that the program does no more than is shown.) | |
PolymorphismPolymorphism means "having many forms." In Java, it means that a single variable might be used with several different types of related objects at different times in a program. When the variable is used with "dot notation" variable.method() to invoke a method, exactly which method is run depends on the object that the variable currently refers to. Here is an example:
| |
QUESTION 13:What will the program write? Click Here after you have answered the question |