Question: The following should have 1 import for each java file, import.java.io USE TRY/CATCH BLOCKS File Details Build a class called FileDetails.java. When you instantiate this

The following should have 1 import for each java file, import.java.io

USE TRY/CATCH BLOCKS

  1. File Details Build a class called FileDetails.java. When you instantiate this class and give it a filename, it will report back the size of the file, whether the file is Readable and whether the file is Writeable; plus any other file information that you might deem important.

This cd goes in main

FileDetails fd=newFileDetails(anyfile.doc);

All other code goes in the constructor.

2. Writing to a File This time build a FileWrite.java. This class, when instantiated, will create a new file and write a String to the file. This coed goes in main

FileWrite fw = new FileWrite(myfile.txt, Go Braves);

All other code goes in the constructor.

3. Reading from a File This time build a class called FileRead.java. This class, when instantiated, will read the text from a file and print the data to the Console. This code goes in main FileRead fr = new FileRead(myfile.txt);

All other code goes in the constructor.

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!