0
Explain pls the output of this code
public static void main(String[] args){ System.out.println(f(3)); } public static int f(int x){ if(x==0){ return 2; }else{ return 1+f(x-1); } } The output is 5.
3 Antworten
+ 2
Read the comments
https://code.sololearn.com/cla838D4eZKZ/?ref=app
+ 1
cyk thankyou. that was useful 😊
0
「HAPPY TO HELP」 thankyou for your help 😊