Quiz7 1
Quiz7 1
True (*)
False
Correct Correct
null (*)
A space
�Name�
�default�
Correct Correct
True (*)
False
Correct Correct
Correct Correct
5. How would you instantiate the Employee class from a main method
located in another class?
Correct Correct
6. An object reference with a null value points to an empty location in memory.
Mark for Review
(1) Points
True (*)
False
True (*)
False
Correct Correct
String s1 = "Hello";
String s2 = "Welcome!";
s1 = s2;
System.out.println("s1: " +s1);
System.out.println("s2: " +s2); Mark for Review
(1) Points
s1: Welcome!
s2: Welcome! (*)
s1: Hello
s2: Welcome!
s1: Hello
s2: Hello
s1: Welcome!
s2: Hello
Correct Correct
True (*)
False
Correct Correct
10. In this statement, identify the type of the variable s.
String
Student (*)
null
Class
Correct Correct
11. Which two statements are true about objects of the same class? Mark for
Review
(1) Points
Each object will have the same reference variable to the location in memory.
Each new instance of an object will have a different location in memory. (*)
All objects of the same class have the same methods. (*)
1
3 (*)
Correct Correct
13. How can you retrieve a value from a method? Mark for Review
(1) Points
Use a return statement and define the method�s return type as non-void (*)
Correct Correct
14. Class name should follow Camel casing rules. Mark for Review
(1) Points
True (*)
False
Correct Correct
15. First, you decide the radius of each circle in the logo. Then
using the same radius you draw 5 circles of same size. All these circles will have
properties like radius and color. All circles share behaviors to calculate
circumference and area. Can you identify which of the following is an object?
Mark for Review
(1) Points
circle (*)
circumference
fiveCircles
radius