Quiz: Variables, Types, and Operators
Test applied understanding of primitives, references, literals, operators, casting, and wrapper classes with this comprehensive quiz.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
Analyze the state of memory after these lines execute:
String s1 = "Hello";
String s2 = "World";
s1 = s2;
A.
There is one object on the Heap. The object “Hello” was overwritten by “World”.
B.
There are two objects on the Heap. s1 points to “Hello”, and s2 points to “World”.
C.
There are two objects on the Heap. Both s1 and s2 point to “Hello”.
D.
There are two objects on the Heap. Both s1 and s2 point to “World”.
1 / 10
...