| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
easy Solved by 6 students
String Reversal with a For Loop
< 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, if anything, is returned by the method call manipulateString(“framework”)?

A

wormaferk

B

krowemarf

C

framework

D

krow

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1lightingstrikes134211 0m 00s 100
#2hitrishabhatia11 0m 00s 100
#3meromaroseif01 0m 57s -67
Items per page:
10
1 – 3 of 3
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy