Java Substring ⬀
Given a string, s, and two indices, start and end, print a
substring consisting of all
characters in the inclusive range from start to end - 1. You'll find the
String class' substring method
helpful in completing this challenge.
- The first line contains a single string denoting
s. - The second line contains two space-separated integers denoting the respective
values of
startandend.
1 ≤ |s| ≤ 1000 ≤ start < end ≤ n- String
sconsists of English alphabetic letters (i.e.,[a-zA-Z]) only.
Print the substring in the inclusive range from start to end - 1.
Helloworld
3 7
lowo
In the diagram below, the substring is highlighted in green:
