For each call to the following method indicate what console
     For each call to the following method, indicate what console output is produced:  public void mystery3(int n) {if (n 
 
  
  Solution
public class Test {
public static void mystery3(int n){
if(n <= 0){
System.out.print(\"*\");
}else if(n%2==0){
System.out.print(\"(\");
mystery3(n-1);
System.out.print(\")\");
}else{
System.out.print(\"[\");
mystery3(n-1);
System.out.print(\"]\");
}
}
public static void main(String args[])
{
mystery3(0);
System.out.println();
mystery3(1);
System.out.println();
mystery3(2);
System.out.println();
mystery3(4);
System.out.println();
mystery3(5);
}
}
/*
Sample Output:
*
[*]
([*])
([([*])])
[([([*])])]
*/


