Summary of Chapter 18 of Java Programming Ideas Fourth Edition

I. Overview

  How to learn java I/O

  1. Learning I/O Class Libraries
  2. 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.
  3. 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.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325217191&siteId=291194637
Recommended