Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  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. Use TRY/CATCH BLOCKS

This cd goes in main

FileDetails fd=newFileDetails(anyfile.doc);

All other code goes in the constructor.

  1. 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 Use TRY/CATCH BLOCKS

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

All other code goes in the constructor.

  1. 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.Use TRY/CATCH BLOCKS 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions