| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
hard
Integer Object Reference Comparison
< Prev
Next >

Develop code to compare object references using Boolean expressions and determine the result of these expressions.

What is printed as a result of executing this code segment?

Integer num1 = 100;
Integer num2 = 100;
Integer num3 = new Integer(100);
Integer num4 = 200;
Integer num5 = 200;

System.out.println(num1 == num2);
System.out.println(num1 == num3);
System.out.println(num4 == num5);
A

false
false
false

B

true
false
true

C

true
true
false

D

true
false
false

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy