nerdexam
Exams1Z0-803Questions#222
Oracle

1Z0-803 · Question #222

1Z0-803 Question #222: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-803 to reveal the answer and full explanation for question #222. The question stem and answer options stay visible for context.

Question

Given: import java.util.*; public class Ref { public static void main(String[] args) { StringBuilder s1 = new StringBuilder("Hello Java!"); String s2 = s1.toString(); List<String> lst = new ArrayList<String>(); lst.add(s2); System.out.println(s1.getClass()); System.out.println(s2.getClass()); System.out.println(lst.getClass()); } } What is the result?

Options

  • Aclass java.lang.String
  • Bclass java.lang.Object
  • Cclass java.lang.StringBuilder
  • Dclass java.lang.StringBuilder

Unlock 1Z0-803 to see the answer

You've previewed enough free 1Z0-803 questions. Unlock 1Z0-803 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-803 Practice