Oracle
1Z0-803 · Question #192
Given: What is the result?
The correct answer is E. An exception is thrown at runtime. Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 6 at java.lang.String.substring(Unknown Source)
Working with Selected Classes from the Java API
Question
Given:
What is the result?
Exhibit
Options
- Abox
- Bnbo
- Cbo
- Dnb
- EAn exception is thrown at runtime
How the community answered
(58 responses)- A3% (2)
- B2% (1)
- C2% (1)
- D9% (5)
- E84% (49)
Explanation
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 6 at java.lang.String.substring(Unknown Source)
Topics
#String methods#runtime exception#StringIndexOutOfBoundsException
Community Discussion
No community discussion yet for this question.
