Oracle
1Z0-819 · Question #193
1Z0-819 Question #193: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #193. The question stem and answer options stay visible for context.
Question
Given: ```java
public class Tester {
public static void main(String[] args) {
String s = "Hat at store";
String t = new String("Hat");
s.substring(s.indexOf(' ') + 1);
s.concat(" at home");
String x = t.substring(t.indexOf(' '));
System.out.println(s + " " + x);
}
}
What is the result?
Options
- AAn IndexOutOfBoundsException is thrown at runtime.
- BHat at home
- CHat at store
- DAt once
- EHat at store 1
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 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.