Question: JAVA 1. Assume DerivedClass is derived from BaseClass and we have a reference variable for each: subRef and baseRef , respectively. Assume baseRef has been
JAVA
1. Assume DerivedClass is derived from BaseClass and we have a reference variable for each: subRef and baseRef, respectively. Assume baseRef has been instantiated but subRef has not.
True or False: At this point in the program, we can do the following without a compiler error:
subRef = (DerivedClass) baseRef;
| True |
| False 2. The statements Card card1, card2, card3, myCard; card1 = new Card(); card2 = card1; will cause how many card objects to be instantiated? (only one correct choice):
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
