Lesson 11. IO

In this lesson you will learn about the input-output (IO) facilities of Java. IO refers to anything that transfers data to or from your application. IO in Java is wonderfully complete, wonderfully complex, and reasonably consistent. You might use Java's IO capabilities to write reports to files or to read user input from the console.

In this lesson, you will learn about:

• organization of the stream classes

• character streams versus byte streams

• the File class

• data streams

• redirecting System.in and System.out

• object streams

• random access files

• nested classes


The java.io package contains dozens of classes to manage input and output using data streams, serialization, and the file system. Understanding the ...

Get Agile Java™: Crafting Code with Test-Driven Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.