Reading and writing text files in Java. In this lesson, we see how we can write a text file in Java and then read it back again.
Text files are useful for a number of reasons, for example, program configuration can be added to a text file and read in when your application launches. Writing text files is useful for logging or for outputting the result of your programs for storage.