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


Answer: B

Computer Science & Information Technology

You might also like to view...

Which of the following refers to an application that intercepts packets traveling on a network or the Internet and copies their contents?

A) Virus B) Key logger C) Packet sniffer D) Spyware

Computer Science & Information Technology

To see the permissions a user has to a file that takes into account their group memberships, what tab should you open in the Advanced Security Settings window for the file?

A. Effective Access B. Auditing C. Special Permissions D. Standard Permissions

Computer Science & Information Technology

Each object has a set of attributes, called ____, that determine the object's appearance and behavior.

A. codes B. events C. global settings D. properties

Computer Science & Information Technology

Describe two important tools to make using Bluetooth more secure.

What will be an ideal response?

Computer Science & Information Technology