Question: Add the following things to the java code import java.io.File; import java.util.Scanner; public class RecursiveFileDirectoryDisplay { public static void main(String[] args) { Scanner scnr =
However, you need to extend it as follows: When the user inputs wrong information (i.e., not a readable directory), a custom exception is thrown internally . The custom exception results in the user being prompted again. Do not print directories, only files. * Create an ArrayList and add the directories to the ArrayList. Print the ArrayList when your program is finished. So: Ask for user input, validate/throw internal error, print files/add dirs, print dirs, done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
