Which answer best describes what the printString method below does?

void printString(String s) {
  if (s.length() > 0) {
    printString(s.substring(1));
    System.out.print(s.substring(0, 1));
  }
}
It prints s in reverse order.
  • It prints s.
  • It prints only the first character of s.
  • It prints only the first two characters of s.
  • It prints only the last character of string s.

Note that the print command is executed after the base case is reached when unwinding the recursion.