Question: Consider the recursive method folderUsage() below, where is the base case of the method? Explain how the base case works in this method. You
Consider the recursive method folderUsage() below, where is the base case of the method? Explain how the base case works in this method. You can refer to the line numbers in your explanation. 52 public double folderUsage (File folder) { 53 54 double total = folder.length(); 55 56 57 58 59 60 61 62 63 64 65 } if (folder.isDirectory()) { for (String childname : folder.list()) { File child = new File(folder, childname); total + folderUsage (child); } } 11 System.out.println(total + return total; "I + folder);
Step by Step Solution
There are 3 Steps involved in it
In the provided recursive method folderUsage the base case of the method can be identified as line 5... View full answer
Get step-by-step solutions from verified subject matter experts
