Question: ` ` ` public static void myMethod ( int n ) { if ( n 1 ) return; System.out.print ( n + )

```
public static void myMethod (int n){
if(n 1)
return;
System.out.print(n +"");
myMethod(n -1);
}
```
What will myMethod(4) do?
4321 will be printed on the terminal.
43210 will be printed on the terminal.
The method will keep running again and again without ever stopping. The method will execute and nothing will be printed on the terminal.
Only the number 4 will be printed on the terminal.
Only the number 0 will be printed on the terminal.
` ` ` public static void myMethod ( int n ) { if

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!