4
answers
0
watching
244
views
28 Dec 2017
23. What String does the following code return if the input to the method is the String with contents ABCD. public static String mystery (String input) { String tricky = ""; for (int i = 0; i < input.length(); i++) { tricky = input.charAt(input.length() - i - 1) + tricky; return tricky; (A) ABCD (B) DDCCBBAA (C) There is a runtime error. (D) AABBCCDD (E) DCBA
23. What String does the following code return if the input to the method is the String with contents ABCD. public static String mystery (String input) { String tricky = ""; for (int i = 0; i < input.length(); i++) { tricky = input.charAt(input.length() - i - 1) + tricky; return tricky; (A) ABCD (B) DDCCBBAA (C) There is a runtime error. (D) AABBCCDD (E) DCBA
4
answers
0
watching
244
views
For unlimited access to Homework Help, a Homework+ subscription is required.
abhisheksinghLv10
1 Oct 2023
22 Jun 2023
Already have an account? Log in
gloryolalere280Lv10
20 Nov 2022
Already have an account? Log in
Elin HesselLv2
28 Dec 2017
Already have an account? Log in