Choosing how to earn college credit? CLEP vs AP guide
| preferred AP College board partner for AP classes
hard Solved by 24 students

String Manipulation With Substring

Mark
< Prev
Next >

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

“compiler”

B

“ilercomp”

C

“ilercom”

D

“pilercom”

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1varunrajaram111 - 100
#2hiboyshello11 - 100
#3Wilbert.Ankomah2711 0m 14s 86
#4ragulk1412200611 0m 23s 77
#5y.seong202711 1m 02s 38
#6bommasam00011 1m 17s 23
#7zhenmunse11 1m 17s 23
#8kazvin.tjakradinata12 1m 14s 16
#9alchemax04311 1m 38s 2
#10hyeokjinlee092412 1m 28s 2
Items per page:
10
1 – 10 of 27
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Instagram: @_apfive_|Privacy Policy|