Oracle Java SE 21 Developer Professional 1z0-830 Question # 23 Topic 3 Discussion

Oracle Java SE 21 Developer Professional 1z0-830 Question # 23 Topic 3 Discussion

1z0-830 Exam Topic 3 Question 23 Discussion:
Question #: 23
Topic #: 3

Given:

java

Integer frenchRevolution = 1789;

Object o1 = new String("1789");

Object o2 = frenchRevolution;

frenchRevolution = null;

Object o3 = o2.toString();

System.out.println(o1.equals(o3));

What is printed?


A.

true


B.

false


C.

A NullPointerException is thrown.


D.

A ClassCastException is thrown.


E.

Compilation fails.


Get Premium 1z0-830 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.