troubleshooting Question

Reading Text file/Binary File/Ascii file...

Avatar of zizi21
zizi21 asked on
7 Comments4 Solutions1860 ViewsLast Modified:

For text files, we use Scanner reader=new Scanner(new File("output.txt")),

To write, we use PrintWriter pw=new PrintWriter(new FileWriter("test.txt"));

For random access file, we use RandomAccessFile rad=new RandomAccessFile("output.txt",rw).

I am confused on two things..Pls help..

Random access files means we can randomly access the file. Regardless, whether it is text, binary, ascii ?? Is this correct ??

For binary files, what do we use to read and write...???Pls help...Thank you very much..

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 4 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros