Java I/O Fundamentals
In this chapter, we’ll introduce you to the fundamentals of Java I/O programming. We’ll cover two topics: how to read and write data from console, and then how to use (file) streams to read and write data.
Programming with I/O involves writing some exception-handling code as well. If you’re not familiar with the basics of exception handling, such as how to use try-catch-finally blocks or try-with-resources statements, we recommend that you to read the first three sections in the chapter on exception handling and assertions ( Chapter 11) and then return to this chapter.