Question
Please help me with these multiple choice questions. 3. The set of all instances of a subclass is a subset of the instances of its
Please help me with these multiple choice questions.
3. The set of all instances of a subclass is a subset of the instances of its superclass.
A. Ture B. False
6. If a data field is declared in the superclass, you may hide it by redeclaring it in the subclass.
A. True B. False
10.
public class Test { public static void main (string[] args) { String s = newString("Welcome to Java"); Object o = s; String d = (String)o;
}
}
A. s, o, and d reference the same String object. B. When casting o to s in String d = (String)o, the contents of o is changed. C. When assigning s to o in Object o = s, a new object is created. D.When casting o to s in String d = (String)o, a new object is created.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started