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 Answers
+ 2
Read the comments
https://code.sololearn.com/cla838D4eZKZ/?ref=app
+ 1
cyk thankyou. that was useful š
0
ćH4PPY 3O H$LPć thankyou for your help š