String Manipulation With Substring
Consider the following method.
public static String scramble(String word, int howFar)
{
return word.substring(howFar + 1, word.length()) +
word.substring(0, howFar);
}
What value is returned by the call scramble("compiler", 3)?
A
“ilercomp”
B
“ilercom”
C
“pilercom”
D
“compiler”
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | hiboyshello | 1 | 1 | 0m 00s | 100 |
| #2 | varunrajaram1 | 1 | 1 | 0m 00s | 100 |
| #3 | y.seong2027 | 1 | 1 | 1m 02s | 38 |
| #4 | bommasam000 | 1 | 1 | 1m 17s | 23 |
| #5 | kazvin.tjakradinata | 1 | 2 | 1m 14s | 16 |
| #6 | alchemax043 | 1 | 1 | 1m 38s | 2 |
| #7 | lsj08030922 | 1 | 2 | 1m 35s | -5 |
| #8 | angelajxi11 | 0 | 1 | 0m 00s | -10 |
| #9 | michael.2103ll | 0 | 1 | 0m 00s | -10 |
| #10 | testdsadasd | 0 | 1 | 0m 01s | -11 |
Items per page:
10
1 – 10 of 21
APFIVE