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
Get step-by-step solutions from verified subject matter experts
