Answer:
The answer to the following question is the option "(ii)".
Explanation:
In the java code firstly we create the derived class (Secret) object and reference variable that is mySecret and secRef. Then we create a base class (Mystery) object and reference variable that is myMystery and mysRef. In the derived class reference variable that holds the base class object. So the legal statement in java is "mysRef = (Mystery) secRef". In this code, the reference variable of the base class holds the value of the base class object and derived class reference variable.