Oracle
1Z0-851 · Question #17
1Z0-851 Question #17: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #17. The question stem and answer options stay visible for context.
Question
Given: 22. StringBuilder sb1 = new StringBuilder("123"); 23. String s1 = "123"; 24. // insert code here 25. System.out.println(sb1 + " " + s1); Which code fragment, inserted at line 24, outputs "123abc 123abc"?
Options
- Asb1.append("abc"); s1.append("abc");
- Bsb1.append("abc"); s1.concat("abc");
- Csb1.concat("abc"); s1.append("abc");
- Dsb1.concat("abc"); s1.concat("abc");
- Esb1.append("abc"); s1 = s1.concat("abc");
- Fsb1.concat("abc"); s1 = s1.concat("abc");
- Gsb1.append("abc"); s1 = s1 + s1.concat("abc");
- Hsb1.concat("abc"); s1 = s1 + s1.concat("abc");
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 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.