String Reversal with a For Loop
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
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | lightingstrikes1342 | 1 | 1 | 0m 00s | 100 |
| #2 | hitrishabhatia | 1 | 1 | 0m 00s | 100 |
| #3 | meromaroseif | 0 | 1 | 0m 57s | -67 |
Items per page:
10
1 – 3 of 3
APFIVE