Question: Consider TV gameroom; String favProgram = Twilight Zone; int sophie = 5; Which of the following variables are declared as a primitive type? (Note that

Consider

TV gameroom;

String favProgram = "Twilight Zone";

int sophie = 5;

Which of the following variables are declared as a primitive type? (Note that this is a multiple answer question.)

Question 2

0 out of 1 points

Consider

TV gameroom;

String favProgram = "Twilight Zone";

int sophie = 5;

Which of the following are correct? (Note that this is a multiple answer question.)

gameRoom, favProgram and sophie all store references to various objects (or contain the value null).

gameRoom and favProgram reference (point to) TV or String objects (or contain the value null). Sophie actually stores the numeric value 5.

the memory assigned to gameRoom actually stores TV object data.

gameRoom references (points to) a TV object (or contains the value null). favProgram actually contains the characters "Twighlight Zone". Sophie actually contains the numeric value 5.

Question 3

0 out of 1 points

A class is to an object as

Selected Answer:

\

Question 4

0 out of 1 points

Consider

1. 1 - TV livingRoom = null;

2. 2- TV den;

3. 3 - new TV();

4. 3 - den = new TV();

4 - Enter the line number where den is declared. Enter x if there is no such line.

Selected Answer:

Question 5

1 out of 1 points

Constructors differ from other methods in that they

Selected Answer:

have no return type

Question 6

0 out of 1 points

Consider

TV gameroom;

String favProgram = "Twilight Zone";

int sophie = 5;

Which of the following are data types? (Note that this is a multiple answer question.)

Question 7

0 out of 1 points

What operator creates an object?

Selected Answer:

constructor

Question 8

0 out of 1 points

Consider

1. Date today;

2. today = new Date();

3. Date tomorrow;

4. tomorrow = today;

Which of the following is correct?

Selected Answer:

On line 4, a new Date object is created with the same values as today's Date object, and that object is copied into tomorrow's memory.

Question 9

0 out of 1 points

Consider

1. TV livingRoom = null;

2. TV den;

3. new TV();

4. den = new TV();

Enter the line number of the first creation of an object. Enter x if there is no such line.

Selected Answer:

2

Question 10

1 out of 1 points

Consider

1. TV livingRoom = null;

2. TV den;

3. new TV();

4. den = new TV();

Enter the first line number in which an object refence is assigned to a variable. Enter x if there is no such line.

Selected Answer:

4

Question 11

0 out of 1 points

Consider

1. TV livingRoom = null;

2. TV den;

3. new TV();

4. den = new TV();

5. livingRoom = new TV();

Write a statement that calls a method to increase the volume of the den's TV. (Use no spaces in your answer.)

Selected Answer:

den.increaseVolume();

Question 12

0 out of 1 points

Consider

TV gameroom;

String favProgram = "Twilight Zone";

int sophie = 5;

Which of the following are reference variables? (Note that this is a multiple answer question.)

favProgram

sophie

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!