The purpose of this assignment is to learn recursive methods. For this particular problem, I need to print the values of list
, one per line. The skeleton of the
I won't give you direct answer, since you won't learn anything from it. You can create the variable to store current depth. Create getter and setter helper methods to increase the depth of recursion. Your method list, will call itself, with the same array, but only after you check that the depth is not bigger then the size of array. Don't forget to increase the depth of the recursion on every call.