Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 44a3892

Browse files
rebuild sidebar.md and SUMMARY.md (#580)
1 parent cd32cda commit 44a3892

File tree

10 files changed

+600
-553
lines changed

10 files changed

+600
-553
lines changed

‎SUMMARY.md‎

Lines changed: 447 additions & 413 deletions
Large diffs are not rendered by default.

‎docs/book/05-Control-Flow.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ i = 4 j = 8
235235

236236
上例中 **int** 类型声明包含了 `i``j`。实际上,在初始化部分我们可以定义任意数量的同类型变量。**注意**:在 Java 中,仅允许 **for** 循环在控制表达式中定义变量。 我们不能将此方法与其他的循环语句和选择语句中一起使用。同时,我们可以看到:无论在初始化还是在步进部分,语句都是顺序执行的。
237237

238-
## for-in 语法
238+
## for-in 语法
239239

240240
Java 5 引入了更为简洁的"增强版 **for** 循环"语法来操纵数组和集合。(更多细节,可参考 [数组](./21-Arrays.md)[集合](./12-Collections.md) 章节内容)。大部分文档也称其为 **for-each** 语法,但因为了不与 Java 8 新添的 `forEach()` 产生混淆,因此我称之为 **for-in** 循环。 (Python 已有类似的先例,如:**for x in sequence**)。**注意**:你可能会在其他地方看到不同叫法。
241241

‎docs/book/11-Inner-Classes.md‎

100644100755
File mode changed.

‎docs/book/18-Strings.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ String x = Immutable.upcase(s);
4747

4848

4949
<!-- Overloading + vs. StringBuilder -->
50-
## `+` 的重载与 `StringBuilder`
50+
## + 的重载与 StringBuilder
5151
`String` 对象是不可变的,你可以给一个 `String` 对象添加任意多的别名。因为 `String` 是只读的,所以指向它的任何引用都不可能修改它的值,因此,也就不会影响到其他引用。
5252

5353
不可变性会带来一定的效率问题。为 `String` 对象重载的 `+` 操作符就是一个例子。重载的意思是,一个操作符在用于特定的类时,被赋予了特殊的意义(用于 `String``+``+=` 是 Java 中仅有的两个重载过的操作符,Java 不允许程序员重载任何其他的操作符 [^1])。

‎docs/book/19-Type-Information.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Triangle.draw()
8484
但是,有时你会碰到一些编程问题,在这些问题中如果你能知道某个泛化引用的具体类型,就可以把问题轻松解决。例如,假设我们允许用户将某些几何形状高亮显示,现在希望找到屏幕上所有高亮显示的三角形;或者,我们现在需要旋转所有图形,但是想跳过圆形(因为圆形旋转没有意义)。这时我们就希望知道 `Stream<Shape>` 里边的形状具体是什么类型,而 Java 实际上也满足了我们的这种需求。使用 RTTI,我们可以查询某个 `Shape` 引用所指向对象的确切类型,然后选择或者剔除特例。
8585

8686
<!-- The Class Object -->
87-
## `Class` 对象
87+
## Class 对象
8888

8989
要理解 RTTI 在 Java 中的工作原理,首先必须知道类型信息在运行时是如何表示的。这项工作是由称为 **`Class`对象** 的特殊对象完成的,它包含了与类有关的信息。实际上,`Class` 对象就是用来创建该类所有"常规"对象的。Java 使用 `Class` 对象来实现 RTTI,即便是类型转换这样的操作都是用 `Class` 对象实现的。不仅如此,`Class` 类还提供了很多使用 RTTI 的其它方式。
9090

‎docs/book/21-Arrays.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,7 +2414,7 @@ After sorting: [[i = 21, j = 6], [i = 70, j = 7], [i = 41, j = 20] ,
24142414
```
24152415

24162416
<!-- Using Arrays.sort() -->
2417-
## Arrays.sort()的使用
2417+
## Arrays.sort的使用
24182418

24192419
使用内置的排序方法,您可以对实现了 **Comparable** 接口或具有 **Comparator** 的任何对象数组 或 任何原生数组进行排序。这里我们生成一个随机字符串对象数组并对其排序:
24202420

‎docs/book/24-Concurrent-Programming.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Java采用了更传统的方法[^2],即在顺序语言之上添加对线程的
221221
Java是一种多线程语言,不管你有没有意识到并发问题,它就在那里。因此,有许多Java程序正在使用中,或者只是偶然工作,或者大部分时间工作并且不时地发生问题,因为。有时这种问题是相对良性的,但有时它意味着丢失有价值的数据,如果你没有意识到并发问题,你最终可能会把问题放在其他地方而不是你的代码中。如果将程序移动到多处理器系统,则可以暴露或放大这些类型的问题。基本上,了解并发性使你意识到正确的程序可能会表现出错误的行为。
222222

223223
<!-- The Brutal Truth -->
224-
## <spanid = "The-Brutal-Truth">残酷的真相</span>
224+
## 残酷的真相
225225

226226
当人类开始烹饪他们的食物时,他们大大减少了他们的身体分解和消化食物所需的能量。烹饪创造了一个"外化的胃",从而释放出能量去发展其他的能力。火的使用促成了文明。
227227

‎docs/book/Appendix-Standard-IO.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class Echo {
3535

3636
`BufferedReader` 提供了 `lines()` 方法,返回类型是 `Stream<String>` 。这显示出流模型的的灵活性:仅使用标准输入就能很好地工作。 `peek()` 方法重启 `TimeAbort`,只要保证至少每隔两秒有输入就能够使程序保持开启状态。
3737

38-
## `System.out` 转换成 `PrintWriter`
38+
## 将System.out 转换成 PrintWriter
3939

4040
`System.out` 是一个 `PrintStream`,而 `PrintStream` 是一个`OutputStream``PrintWriter` 有一个把 `OutputStream` 作为参数的构造器。因此,如果你需要的话,可以使用这个构造器把 `System.out` 转换成 `PrintWriter`
4141

‎docs/index.html‎

100644100755
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -352,22 +352,22 @@
352352
repo: 'https://github.com/LingCoder/OnJava8',
353353
loadSidebar: 'sidebar.md',
354354
// subMaxLevel: 3,
355-
search: {
356-
paths: 'auto',
357-
placeholder: '🔍 点击搜索 ',
358-
noData: '😞 没有结果! ',
359-
// Headline depth, 1 - 6
360-
depth: 6
361-
},
362-
copyCode: {
363-
buttonText : '复制',
364-
errorText : 'Error',
365-
successText: 'OK!'
366-
},
367-
pagination: {
368-
previousText: '上一章节',
369-
nextText: '下一章节',
370-
},
355+
search: {
356+
paths: 'auto',
357+
placeholder: '🔍 点击搜索 ',
358+
noData: '😞 没有结果! ',
359+
// Headline depth, 1 - 6
360+
depth: 6
361+
},
362+
copyCode: {
363+
buttonText : '复制',
364+
errorText : 'Error',
365+
successText: 'OK!'
366+
},
367+
pagination: {
368+
previousText: '上一章节',
369+
nextText: '下一章节',
370+
},
371371
coverpage: true,
372372
}
373373
</script>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /