Question 74 of 513
1Z0-829 Practice Question: Handling Date, Time, Text, Numeric and Boolean Values
Exhibit
Refer to the exhibit.
public static void main(String[] args) {
String s = "Hello".toUpperCase().substring(1, 3);
System.out.println(s);
}What is the output?
⚠ Common exam trap
The trap here is that candidates often forget the end index of `substring` is exclusive, leading them to include an extra character, or they miscompute the join result by overlooking the empty delimiter.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
EL
The code uses `String.join("", "H", "E", "L", "L", "O")` which concatenates the elements with an empty delimiter, resulting in "HELLO". Then `substring(1, 3)` extracts characters from index 1 (inclusive) to index 3 (exclusive), yielding "EL". Option A is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
EL
Why this is correct
Correct substring indices.
- ✗
HEL
Why it's wrong here
substring(1,3) excludes index 3.
- ✗
ELLO
Why it's wrong here
That would be substring(1).
- ✗
HELL
Why it's wrong here
Includes index 0? No.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.