I have the following:
public static void main(String[] args){
Screen.clear();
System.out.println(depth(5,0));
}
public static int depth(int n, int depth){
System.out.println(depth);
if(n == 0)return depth;
else{
System.out.println(depth);
return depth(n-1, depth++);
}
}
why does this always print out 0, n times? Why isn't depth being incremented?