Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
easy Solved by 3 students

String Reversal with a For Loop

Mark
< Prev
Next >

Consider the following method.

public static String manipulateString(String inputStr) {
  String resultStr = "";
  for (int idx = inputStr.length() - 1; idx >= 0; idx--) {
    resultStr += inputStr.charAt(idx);
  }
  return resultStr;
}

What is returned by the method call manipulateString("framework")?

A

wormaferk

B

krow

C

krowemarf

D

framework

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
#1lightingstrikes134211 0m 00s 100
#2hitrishabhatia11 0m 00s 100
#3busemagngr11 0m 22s 78
#4meromaroseif01 0m 57s -67
Items per page:
10
1 – 4 of 4

AI Tutor

How can I help?

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