· Consider TV gameroom; String favProgram = \"Twilight Zone\"; int sophie = 5; W
ID: 3600641 • Letter: #
Question
·
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
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.)
Explanation / Answer
1. TV Gameroom;
String favprogram="Twilight Zone";
int sophie=5;
Which of the Following varibales are declared as premitive Datatypes?
Answer:
---------
int sophie=5;
where Gameroom is Object type Data. Which contains Data members and methods
And String is Immutable Object which is non premitive.
So int is premitive datatype.
2. TV Gameroom;
String favprogram="Twilight Zone";
int sophie=5;
Answer:
--------
D.Gameroom references to (ponits to)TV object(or contains the value null).
favprogram actually contains the characters "Twilight Zone".
Sophie Actually contains the Numeric value '5'.
3. A class is to an object as:
Answer:
---------
Its Blue Print for an object.its references to an object.
4. Consider
1.TV livingRoom = null;
2.TV den;
3.new TV();
4.den=new TV();
Enter the Line Number where den is Declared.enter x if no such line.
Answer:
-------------
2.TV den;
Actually den is an object(instance of TV class) that is Declared
in Second line.
And Creating references to an object in 3rd Line. i.e Creating Constructor.
5. Constructor are Different from other Methods in that they
Answer:
----------
have No return Type.
Actually,It constructs the values i.e. provides data for the object.
have no return type and collection of Data Members;
6. TV Gameroom;
String favprogram="Twilight Zone";
int sophie=5;
Which of the following are the datatypes?
Answer:
-------------
String and int are the Datatypes.
where Gameroom is an object
7.which operator creates an object in java?
Answer:
---------
New operator is used to create an object.
8.Date today;
today = new Date();
Date Tomorrow;
Tomorrow=today;
Which of the following is correct?
Answer:
--------------
a New Date Object is created with the same values as today's Date Object,
And that object is copied into tomorrow's Memory.
9. Consider
1.TV livingRoom = null;
2.TV den;
3.new TV();
4.den=new TV();
Enter the Line Number First creation of an object.enter x if no such line.
Answer:
-------------
Line 1.created an object called "livingRoom" that references to null memory.
10. Consider
1.TV livingRoom = null;
2.TV den;
3.new TV();
4.den=new TV();
Enter the first Line Number in which an object refernce is
assigned to variable
enter x if no such line.
Answer:
-------------
Line 4.den=new TV();
here,creating class that have some Member varibles.
and object "den" referring to the Member variables.
11.
Answer:
------------------
dens.increaseVoulme();
12. TV Gameroom;
String favprogram="Twilight Zone";
int sophie=5;
Which are Reference varibales?
Answer:
-----------
favprogram and Gameroom are refernce varibles
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.