修正全书错别字、术语统一和逻辑错误

This commit is contained in:
2026-06-10 12:59:03 +08:00
parent ca56eedfda
commit fa6dbeb74e
18 changed files with 198 additions and 87 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
> The File class is intended to provide an abstraction that deals with most of the machine-dependent complexities of files and path names in a machine-independent fashion. The filename is a string. The File class is a wrapper class for the file name and its directory path.
>
> 文件类提供了一个与机器(操作系统)无关的文件和路径操作的封装;文件类主要用作文件名和路径的操作,并不对文件本的内容进行操作。
> 文件类提供了一个与机器(操作系统)无关的文件和路径操作的封装;文件类主要用作文件名和路径的操作,并不对文件本的内容进行操作。
注意:
@@ -65,7 +65,7 @@ public class TestFileClass {
### 2.1. PrintWrite类
### 2.1. PrintWriter
![image-20230324145547079](img/image-20230324145547079.png)
@@ -110,7 +110,7 @@ Eric K Jones 85
**注意:File对象没有close()方法,因为File对象不对文件的具体内容进行操作。**
主函数是有返回值的,返回一个整数;对于多数操作系统来说,返回值代表程序是否运行成功;一般返回值是0代表成功,没有错误;非零代表有错误。
主函数可以带返回值吗?main函数的返回值是void,因此没有返回值。这里是指系统命令的执行退出码,如果需要返回给操作系统一个值,可以使用System.exit(返回值);对于多数操作系统来说,返回值代表程序是否运行成功;一般返回值是0代表成功,没有错误;非零代表有错误。
### 2.2. 不要别忘记关闭文件
@@ -231,6 +231,6 @@ public class ReadFileFromURL {
1. 掌握File类的基本使用;
2. 掌握PrintWriter的基本使用;
3. 掌握Scnner读取文本文件内容的基本使用;
3. 掌握Scanner读取文本文件内容的基本使用;
4. 了解 try(...){...}语法;
5.