I. Overview
How to learn java I/O
- Learning I/O Class Libraries
- Study I/O history, why study history? Because, without history, we get confused about when to use which classes, and when not to use them.
- Learn about nio
Second, the File class
- The File class is a tool class that helps us deal with file directory issues
- The File class represents not a file, but a class of files. It can represent both the name of a specific file and the name of a group of files in a directory.
- If File refers to a collection of files, you can call the list() method, which returns an array. Note that it is an array, not a container, because the number of returned files is fixed.