Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
hard Solved by 20 students

String Manipulation With Substring

< 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
Mark for review

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1hiboyshello11 0m 00s 100
#2varunrajaram111 0m 00s 100
#3ragulk1412200611 0m 23s 77
#4y.seong202711 1m 02s 38
#5bommasam00011 1m 17s 23
#6kazvin.tjakradinata12 1m 14s 16
#7hyeokjinlee092412 1m 28s 2
#8alchemax04311 1m 38s 2
#9lsj0803092212 1m 35s -5
#10angelajxi1101 0m 00s -10
Items per page:
10
1 – 10 of 23

AI Tutor

How can I help?

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