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

Verified
Correct Answer:
Verified
Q4: A subclass can override public methods of
Q7: A subclass inherits all its data members
Q9: In Java, stream classes are implemented using
Q13: In Java, polymorphism is implemented using late
Q15: A subclass can directly access protected members
Q21: An abstract method _.<br>A) is any method
Q31: Inheritance implies an "is-a" relationship.
Q35: A subclass can directly access _.<br>A) public
Q37: An abstract class can contain _.<br>A) only
Q40: In Java, you can automatically make a