Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions