Skip to main content

Practice · 2 of 4

Master MCQ

CHALLENGE
Difficulty: advanced+25 XP

What does mystery("racecar") return? ``java public static boolean mystery(String s) { return rev(s).equals(s); } public static String rev(String s) { if (s.length() <= 1) { return s; } return rev(s.substring(1)) + s.charAt(0); } `` A. true B. false C. the empty string D. StackOverflowError Print the letter, then your one-sentence justification.

Back to lesson: Practice: Master simulation: MCQ section