This question refers to the following declaration: String line = "Some more silly stuff on strings!"; //the words are separated by a single space What string will str refer to after execution of the following? int x = line.indexOf("m"); String str = line.substring(10, 15) + line.substring(25, 25 + x); (A) "sillyst" (B) "sillystr" (C) "silly st" (D) "silly str" (E) "sillystrin"
This question refers to the following declaration: String line = "Some more silly stuff on strings!"; //the words are separated by a single space What string will str refer to after execution of the following? int x = line.indexOf("m"); String str = line.substring(10, 15) + line.substring(25, 25 + x); (A) "sillyst" (B) "sillystr" (C) "silly st" (D) "silly str" (E) "sillystrin"
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 19RQ
Related questions
Question
![This question refers to the following declaration:
String line = "Some more silly stuff on strings!";
//the words are separated by a single space
What string will str refer to after execution of the following?
int x =
line.indexOf("m");
String str = line.substring(10, 15) + line.substring(25, 25 + x);
(A) "sillyst"
(B) "sillystr"
(C) "silly st"
(D) "silly str"
(E) "sillystrin"](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa0a78807-cef7-4e53-b687-7cc304cb5087%2F3ad3b979-8410-47d0-ac78-3f1b097e02c3%2Fgv37e8b_processed.jpeg&w=3840&q=75)
Transcribed Image Text:This question refers to the following declaration:
String line = "Some more silly stuff on strings!";
//the words are separated by a single space
What string will str refer to after execution of the following?
int x =
line.indexOf("m");
String str = line.substring(10, 15) + line.substring(25, 25 + x);
(A) "sillyst"
(B) "sillystr"
(C) "silly st"
(D) "silly str"
(E) "sillystrin"
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT