Question: Java Question. (File & Directory Manipulation) Create a static method named task1 1) Ask the user for a file name (You will automatically add the

Java Question. (File & Directory Manipulation)

Create a static method named task1 1) Ask the user for a file name (You will automatically add the txt extension to the file name) 2) Ask the user for text content to add to the file. 3) Write or append to the file in Step 1) the text content in Step2)

Create a static method named task2 1) Ask the user for a relative path value.

2) Determine if the relative path exists a) If not found: i) output to Standard Error an appropriate message and end the program. b) If found: i) Output the count of all files and folders found. This count should include subdirectories. Output a total count, a file count and a directory count.

(File & Directory Manipulation)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!