Given the following class code: public class RecurseSample {…

Given the following class code: public class RecurseSample { public static void main(String[] args) { System.out.println(recurse(3)); } public static int recurse(int n) { int total = 0; if (n == 0) { return 0; } else { total = 3 + recurse(n – 1); } return total; } } What values will be printed when this code is executed?

Given the following class code: public class RecurseSample {…

Given the following class code: public class RecurseSample { public static void main(String[] args) { System.out.println(recurse(3)); } public static int recurse(int n) { int total = 0; if (n == 0) { return 0; } else { total = 3 + recurse(n – 1); } return total; } } What values will be printed when this code is executed?