Multiple Choice
Suppose that the class Mystery is derived from the class Secret. Consider the following statements.Secret mySecret = new Secret() ;
Secret secRef;Mystery myMystery = new Mystery() ;
Mystery mysRef;secRef = myMystery;Which of the following statements is legal in Java?
(i) mysRef = (Mystery) mySecret;
(ii) mysRef = (Mystery) secRef;
A) Only (i)
B) Only (ii)
C) Both (i) and (ii)
D) None of these
Correct Answer:

Verified
Correct Answer:
Verified
Q2: Consider the following class definitions.public class BClass<br>{<br>Private
Q3: Based on the diagram in the accompanying
Q8: An abstract class _.<br>A) does not have
Q11: Interfaces are defined using the reserved word
Q12: An abstract method is a method that
Q29: Which of the following statements about the
Q43: To override a public method of a
Q44: The private members of a superclass can
Q46: You must always use the reserved word
Q48: What is the correct syntax for defining