forked from itwanger/toBeBetterJavaer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enum.html
181 lines (164 loc) · 135 KB
/
enum.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!doctype html>
<html lang="zh-CN" data-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="generator" content="VuePress 2.0.0-beta.67" />
<meta name="theme" content="VuePress Theme Hope" />
<meta name="keywords" content="Java,枚举,enum,java 枚举,java enum"><meta property="og:url" content="https://javabetter.cn/basic-extra-meal/enum.html"><meta property="og:site_name" content="二哥的Java进阶之路"><meta property="og:title" content="Java枚举:小小enum,优雅而干净"><meta property="og:description" content="本文全面介绍了Java枚举的概念、基础语法、高级应用以及在实际项目中的应用。通过详细的示例和解释,帮助读者深入理解枚举类型的使用"><meta property="og:type" content="article"><meta property="og:locale" content="zh-CN"><meta property="og:updated_time" content="2023-12-08T12:03:00.000Z"><meta property="article:author" content="沉默王二"><meta property="article:tag" content="Java重要知识点"><meta property="article:modified_time" content="2023-12-08T12:03:00.000Z"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"Java枚举:小小enum,优雅而干净","image":[""],"dateModified":"2023-12-08T12:03:00.000Z","author":[{"@type":"Person","name":"沉默王二","url":"/about-the-author/"}]}</script><meta name="robots" content="all"><meta name="author" content="沉默王二"><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0"><meta name="apple-mobile-web-app-capable" content="yes"><script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5230ac143650bf5eb3c14f3fb9b1d3ec";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><link rel="stylesheet" href="//at.alicdn.com/t/font_3180624_7cy10l7jqqh.css"><link rel="icon" href="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/favicon.ico"><link rel="icon" href="/assets/icon/chrome-mask-512.png" type="image/png" sizes="512x512"><link rel="icon" href="/assets/icon/chrome-mask-192.png" type="image/png" sizes="192x192"><link rel="icon" href="/assets/icon/chrome-512.png" type="image/png" sizes="512x512"><link rel="icon" href="/assets/icon/chrome-192.png" type="image/png" sizes="192x192"><link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials"><meta name="theme-color" content="#096dd9"><link rel="apple-touch-icon" href="/assets/icon/apple-icon-152.png"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="msapplication-TileImage" content="/assets/icon/ms-icon-144.png"><meta name="msapplication-TileColor" content="#ffffff"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"><title>Java枚举:小小enum,优雅而干净 | 二哥的Java进阶之路</title><meta name="description" content="本文全面介绍了Java枚举的概念、基础语法、高级应用以及在实际项目中的应用。通过详细的示例和解释,帮助读者深入理解枚举类型的使用">
<style>
:root {
--bg-color: #fff;
}
html[data-theme="dark"] {
--bg-color: #1d1e1f;
}
html,
body {
background: var(--bg-color);
}
</style>
<script>
const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
const systemDarkMode =
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches;
if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
document.documentElement.setAttribute("data-theme", "dark");
}
</script>
<link rel="preload" href="/assets/style-ec31d3d3.css" as="style"><link rel="stylesheet" href="/assets/style-ec31d3d3.css">
<link rel="modulepreload" href="/assets/app-dea8ffe7.js"><link rel="modulepreload" href="/assets/enum.html-5e403f4d.js"><link rel="modulepreload" href="/assets/plugin-vue_export-helper-c27b6911.js"><link rel="modulepreload" href="/assets/enum.html-af30e4ab.js"><link rel="prefetch" href="/assets/index.html-6896c647.js" as="script"><link rel="prefetch" href="/assets/blog.html-f1f40691.js" as="script"><link rel="prefetch" href="/assets/home.html-a403fdc1.js" as="script"><link rel="prefetch" href="/assets/bzhan-10wan.html-3a3b1bb2.js" as="script"><link rel="prefetch" href="/assets/csdn-1000wan.html-4f2d080d.js" as="script"><link rel="prefetch" href="/assets/index.html-c060d9c7.js" as="script"><link rel="prefetch" href="/assets/zhihu-1000wan.html-462c982c.js" as="script"><link rel="prefetch" href="/assets/array.html-36da03a6.js" as="script"><link rel="prefetch" href="/assets/double-array.html-59d0cb0d.js" as="script"><link rel="prefetch" href="/assets/print.html-b124a5fd.js" as="script"><link rel="prefetch" href="/assets/basic-data-type.html-425f11fd.js" as="script"><link rel="prefetch" href="/assets/basic-exercise.html-d3790bcb.js" as="script"><link rel="prefetch" href="/assets/bigdecimal-biginteger.html-612adcb4.js" as="script"><link rel="prefetch" href="/assets/flow-control.html-5c7cd9dd.js" as="script"><link rel="prefetch" href="/assets/javadoc.html-e8207ba9.js" as="script"><link rel="prefetch" href="/assets/operator.html-123d5f77.js" as="script"><link rel="prefetch" href="/assets/type-cast.html-16ecbcb3.js" as="script"><link rel="prefetch" href="/assets/48-keywords.html-981e3a53.js" as="script"><link rel="prefetch" href="/assets/Overriding.html-8492a9cc.js" as="script"><link rel="prefetch" href="/assets/annotation.html-90f8578c.js" as="script"><link rel="prefetch" href="/assets/box.html-ec79b8ae.js" as="script"><link rel="prefetch" href="/assets/class-object.html-53a5bdf9.js" as="script"><link rel="prefetch" href="/assets/comparable-omparator.html-e1bfd760.js" as="script"><link rel="prefetch" href="/assets/deep-copy.html-7f574982.js" as="script"><link rel="prefetch" href="/assets/equals-hashcode.html-b4e82932.js" as="script"><link rel="prefetch" href="/assets/fanshe.html-02328c72.js" as="script"><link rel="prefetch" href="/assets/generic.html-6ae4cb05.js" as="script"><link rel="prefetch" href="/assets/hashcode.html-70d32908.js" as="script"><link rel="prefetch" href="/assets/immutable.html-64a87d92.js" as="script"><link rel="prefetch" href="/assets/instanceof-jvm.html-078aa552.js" as="script"><link rel="prefetch" href="/assets/instanceof.html-c9121a58.js" as="script"><link rel="prefetch" href="/assets/int-cache.html-d6d10629.js" as="script"><link rel="prefetch" href="/assets/java-naming.html-e9ee774d.js" as="script"><link rel="prefetch" href="/assets/java-unicode.html-10433726.js" as="script"><link rel="prefetch" href="/assets/jdk-while-for-wuxian-xunhuan.html-ee4f7686.js" as="script"><link rel="prefetch" href="/assets/jdk9-char-byte-string.html-608cfe76.js" as="script"><link rel="prefetch" href="/assets/override-overload.html-505ea6b3.js" as="script"><link rel="prefetch" href="/assets/pass-by-value.html-15acd903.js" as="script"><link rel="prefetch" href="/assets/true-generic.html-fb51fe4e.js" as="script"><link rel="prefetch" href="/assets/varables.html-30b43a11.js" as="script"><link rel="prefetch" href="/assets/beijing.html-d6945ee0.js" as="script"><link rel="prefetch" href="/assets/chengdu.html-e824cea2.js" as="script"><link rel="prefetch" href="/assets/guangzhou.html-36746483.js" as="script"><link rel="prefetch" href="/assets/hangzhou.html-64b59f16.js" as="script"><link rel="prefetch" href="/assets/jinan.html-6452b409.js" as="script"><link rel="prefetch" href="/assets/nanjing.html-525f0ed8.js" as="script"><link rel="prefetch" href="/assets/qingdao.html-79e09121.js" as="script"><link rel="prefetch" href="/assets/shenzhen.html-d67ca4ae.js" as="script"><link rel="prefetch" href="/assets/suzhou.html-fe1af157.js" as="script"><link rel="prefetch" href="/assets/wuhan.html-a46f4845.js" as="script"><link rel="prefetch" href="/assets/xian.html-52c1bbdc.js" as="script"><link rel="prefetch" href="/assets/zhengzhou.html-fa55ea38.js" as="script"><link rel="prefetch" href="/assets/PriorityQueue.html-7dda40ec.js" as="script"><link rel="prefetch" href="/assets/WeakHashMap.html-034f99ad.js" as="script"><link rel="prefetch" href="/assets/arraydeque.html-e0054edd.js" as="script"><link rel="prefetch" href="/assets/arraylist.html-f8eeecb3.js" as="script"><link rel="prefetch" href="/assets/fail-fast.html-33ff838c.js" as="script"><link rel="prefetch" href="/assets/gailan.html-c6e5d650.js" as="script"><link rel="prefetch" href="/assets/hashmap.html-3d9f5bf5.js" as="script"><link rel="prefetch" href="/assets/iterator-iterable.html-97b4585f.js" as="script"><link rel="prefetch" href="/assets/linkedhashmap.html-dbc7e2d6.js" as="script"><link rel="prefetch" href="/assets/linkedlist.html-2ea2e9bd.js" as="script"><link rel="prefetch" href="/assets/list-war-2.html-841934b5.js" as="script"><link rel="prefetch" href="/assets/time-complexity.html-3d3dbc8c.js" as="script"><link rel="prefetch" href="/assets/treemap.html-c88192e7.js" as="script"><link rel="prefetch" href="/assets/Objects.html-0d65caf8.js" as="script"><link rel="prefetch" href="/assets/StringUtils.html-56106d87.js" as="script"><link rel="prefetch" href="/assets/arrays.html-249b8e80.js" as="script"><link rel="prefetch" href="/assets/collections.html-55e2172e.js" as="script"><link rel="prefetch" href="/assets/guava.html-b178f406.js" as="script"><link rel="prefetch" href="/assets/hutool.html-0a4f348e.js" as="script"><link rel="prefetch" href="/assets/scanner.html-129eb6a2.js" as="script"><link rel="prefetch" href="/assets/utils.html-bfa3ed99.js" as="script"><link rel="prefetch" href="/assets/os.html-02bf3c7f.js" as="script"><link rel="prefetch" href="/assets/wangluo.html-ad5d42dd.js" as="script"><link rel="prefetch" href="/assets/history.html-1d239f57.js" as="script"><link rel="prefetch" href="/assets/javabooks.html-1a9103a1.js" as="script"><link rel="prefetch" href="/assets/learn-jianyi.html-49096c6c.js" as="script"><link rel="prefetch" href="/assets/nicearticle.html-a974a3b4.js" as="script"><link rel="prefetch" href="/assets/rumen.html-a3d59ffd.js" as="script"><link rel="prefetch" href="/assets/gailan.html-c4fc478b.js" as="script"><link rel="prefetch" href="/assets/npe.html-4ee390a0.js" as="script"><link rel="prefetch" href="/assets/shijian.html-d1b5090f.js" as="script"><link rel="prefetch" href="/assets/try-catch-xingneng.html-118b6a1b.js" as="script"><link rel="prefetch" href="/assets/try-with-resources.html-39ed2b10.js" as="script"><link rel="prefetch" href="/assets/git-qiyuan.html-fe8bd069.js" as="script"><link rel="prefetch" href="/assets/progit.html-0354f264.js" as="script"><link rel="prefetch" href="/assets/DBeaver.html-fb9fd30b.js" as="script"><link rel="prefetch" href="/assets/brew.html-9d00d447.js" as="script"><link rel="prefetch" href="/assets/chiner.html-fdcf8df4.js" as="script"><link rel="prefetch" href="/assets/choco.html-97dd9711.js" as="script"><link rel="prefetch" href="/assets/fastjson.html-6d387440.js" as="script"><link rel="prefetch" href="/assets/forest.html-4e960d36.js" as="script"><link rel="prefetch" href="/assets/gson.html-04f378ab.js" as="script"><link rel="prefetch" href="/assets/jackson.html-da8d6e2f.js" as="script"><link rel="prefetch" href="/assets/junit.html-813748e0.js" as="script"><link rel="prefetch" href="/assets/knife4j.html-fb7e6f1e.js" as="script"><link rel="prefetch" href="/assets/log4j.html-a1988ef9.js" as="script"><link rel="prefetch" href="/assets/log4j2.html-043b7035.js" as="script"><link rel="prefetch" href="/assets/logback.html-6231a565.js" as="script"><link rel="prefetch" href="/assets/others.html-b58cbfa3.js" as="script"><link rel="prefetch" href="/assets/slf4j.html-eaf0a86c.js" as="script"><link rel="prefetch" href="/assets/tabby.html-ceb52e1f.js" as="script"><link rel="prefetch" href="/assets/warp.html-46cfc7a7.js" as="script"><link rel="prefetch" href="/assets/windterm.html-8c6d96be.js" as="script"><link rel="prefetch" href="/assets/4-debug-skill.html-1bb59e4c.js" as="script"><link rel="prefetch" href="/assets/shenji-chajian-10.html-1613604d.js" as="script"><link rel="prefetch" href="/assets/xechat.html-6ab8484a.js" as="script"><link rel="prefetch" href="/assets/dubbo-17.html-1d5d7476.js" as="script"><link rel="prefetch" href="/assets/java-34.html-6b3ceba9.js" as="script"><link rel="prefetch" href="/assets/java-basic-baguwen.html-5774e2c3.js" as="script"><link rel="prefetch" href="/assets/java-hashmap-13.html-9f66f862.js" as="script"><link rel="prefetch" href="/assets/java-jvm-baguwen.html-b89e5b2e.js" as="script"><link rel="prefetch" href="/assets/java-thread-baguwen.html-eb5d9fe2.js" as="script"><link rel="prefetch" href="/assets/kafka-40.html-c0d7ff98.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-bigfile-miaochuan.html-e63a649f.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-fenkufenbiao.html-5c10537f.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-youhuiquan.html-072617d6.js" as="script"><link rel="prefetch" href="/assets/mysql-60.html-55c78692.js" as="script"><link rel="prefetch" href="/assets/mysql-suoyin-15.html-284a563a.js" as="script"><link rel="prefetch" href="/assets/nginx-40.html-c5a74461.js" as="script"><link rel="prefetch" href="/assets/redis-12.html-b4f9a5f0.js" as="script"><link rel="prefetch" href="/assets/Serializbale.html-3aff2791.js" as="script"><link rel="prefetch" href="/assets/buffer.html-665f4b0d.js" as="script"><link rel="prefetch" href="/assets/char-byte.html-d8a6ba00.js" as="script"><link rel="prefetch" href="/assets/file-path.html-76566497.js" as="script"><link rel="prefetch" href="/assets/print.html-80126690.js" as="script"><link rel="prefetch" href="/assets/reader-writer.html-9f335c22.js" as="script"><link rel="prefetch" href="/assets/serialize.html-99755726.js" as="script"><link rel="prefetch" href="/assets/shangtou.html-22a723f5.js" as="script"><link rel="prefetch" href="/assets/stream.html-91d8bc25.js" as="script"><link rel="prefetch" href="/assets/transient.html-e0cd180e.js" as="script"><link rel="prefetch" href="/assets/Lambda.html-c17cd2ca.js" as="script"><link rel="prefetch" href="/assets/java14.html-4626b229.js" as="script"><link rel="prefetch" href="/assets/optional.html-24fb31d4.js" as="script"><link rel="prefetch" href="/assets/stream.html-bc62142a.js" as="script"><link rel="prefetch" href="/assets/asm.html-75a99a47.js" as="script"><link rel="prefetch" href="/assets/bytecode.html-e8f928c3.js" as="script"><link rel="prefetch" href="/assets/class-file-jiegou.html-14a7b070.js" as="script"><link rel="prefetch" href="/assets/class-load.html-a941da78.js" as="script"><link rel="prefetch" href="/assets/compile-jdk.html-79739861.js" as="script"><link rel="prefetch" href="/assets/cpu-percent-100.html-d1c1c3cf.js" as="script"><link rel="prefetch" href="/assets/garbage-collector.html-0300af73.js" as="script"><link rel="prefetch" href="/assets/gc-collector.html-31bf98a8.js" as="script"><link rel="prefetch" href="/assets/gc.html-0338b3bb.js" as="script"><link rel="prefetch" href="/assets/how-jvm-run-zijiema-zhiling.html-44628196.js" as="script"><link rel="prefetch" href="/assets/how-run-java-code.html-d6298a9c.js" as="script"><link rel="prefetch" href="/assets/hsdb.html-027fac52.js" as="script"><link rel="prefetch" href="/assets/jit.html-0bbc9bec.js" as="script"><link rel="prefetch" href="/assets/meituan-9-gc.html-950b1687.js" as="script"><link rel="prefetch" href="/assets/neicun-jiegou.html-f3eb7009.js" as="script"><link rel="prefetch" href="/assets/oom.html-ab4f847e.js" as="script"><link rel="prefetch" href="/assets/problem-tools.html-86cdaf1a.js" as="script"><link rel="prefetch" href="/assets/index.html-82f93945.js" as="script"><link rel="prefetch" href="/assets/stack-frame.html-aa4e2264.js" as="script"><link rel="prefetch" href="/assets/tujie-gc.html-ebd90f16.js" as="script"><link rel="prefetch" href="/assets/vm-stack-register.html-525c9d47.js" as="script"><link rel="prefetch" href="/assets/what-happen-when-javac.html-a8630847.js" as="script"><link rel="prefetch" href="/assets/what-is-jvm.html-78cc38a9.js" as="script"><link rel="prefetch" href="/assets/whereis-the-object.html-d71973da.js" as="script"><link rel="prefetch" href="/assets/zijiema-zhiling.html-f9f2d56c.js" as="script"><link rel="prefetch" href="/assets/zongjie.html-1dd32909.js" as="script"><link rel="prefetch" href="/assets/auto-generator.html-e4bf00bb.js" as="script"><link rel="prefetch" href="/assets/index.html-c6d7a628.js" as="script"><link rel="prefetch" href="/assets/yuneban-wangyiyunyinyue.html-1548f16c.js" as="script"><link rel="prefetch" href="/assets/maven.html-b39b7158.js" as="script"><link rel="prefetch" href="/assets/chengxyspnhxagzl.html-a1566b96.js" as="script"><link rel="prefetch" href="/assets/huanxgzl.html-819243e6.js" as="script"><link rel="prefetch" href="/assets/quzjlsspdx.html-e96c61f8.js" as="script"><link rel="prefetch" href="/assets/shanganaliyun.html-29da0fc1.js" as="script"><link rel="prefetch" href="/assets/shezynmjfxhelmtttjddd.html-f8faf762.js" as="script"><link rel="prefetch" href="/assets/xuelybdzheloffer.html-9d010034.js" as="script"><link rel="prefetch" href="/assets/zheisnylzldhzd.html-9ac69874.js" as="script"><link rel="prefetch" href="/assets/api-wangguan.html-1e0bf31c.js" as="script"><link rel="prefetch" href="/assets/rumen.html-c4a3df17.js" as="script"><link rel="prefetch" href="/assets/100-budiushi.html-569a81fa.js" as="script"><link rel="prefetch" href="/assets/kafka.html-79415df6.js" as="script"><link rel="prefetch" href="/assets/rabbitmq-rumen.html-d6977dde.js" as="script"><link rel="prefetch" href="/assets/install.html-554652c1.js" as="script"><link rel="prefetch" href="/assets/lijie-shiwu.html-b76f32c1.js" as="script"><link rel="prefetch" href="/assets/redis-shuju-yizhixing.html-918357a2.js" as="script"><link rel="prefetch" href="/assets/shiwu-shixian.html-7e02ddf3.js" as="script"><link rel="prefetch" href="/assets/rumen.html-9c05a8e2.js" as="script"><link rel="prefetch" href="/assets/nginx.html-74b3c8aa.js" as="script"><link rel="prefetch" href="/assets/BIONIOAIO.html-2f2c80b6.js" as="script"><link rel="prefetch" href="/assets/buffer-channel.html-88cecb4f.js" as="script"><link rel="prefetch" href="/assets/moxing.html-230346e6.js" as="script"><link rel="prefetch" href="/assets/network-connect.html-1c9e8b0d.js" as="script"><link rel="prefetch" href="/assets/nio-better-io.html-1905f5e7.js" as="script"><link rel="prefetch" href="/assets/paths-files.html-513db619.js" as="script"><link rel="prefetch" href="/assets/abstract-vs-interface.html-2afbf4f3.js" as="script"><link rel="prefetch" href="/assets/abstract.html-0dc72e83.js" as="script"><link rel="prefetch" href="/assets/access-control.html-1d997502.js" as="script"><link rel="prefetch" href="/assets/code-init.html-4a488348.js" as="script"><link rel="prefetch" href="/assets/construct.html-13b725a0.js" as="script"><link rel="prefetch" href="/assets/encapsulation-inheritance-polymorphism.html-acbafdc9.js" as="script"><link rel="prefetch" href="/assets/encapsulation.html-7fd2c50a.js" as="script"><link rel="prefetch" href="/assets/extends-bigsai.html-aeb190f0.js" as="script"><link rel="prefetch" href="/assets/final.html-8116fb58.js" as="script"><link rel="prefetch" href="/assets/inner-class.html-5b6833fd.js" as="script"><link rel="prefetch" href="/assets/interface.html-229b9d7f.js" as="script"><link rel="prefetch" href="/assets/method.html-c3489033.js" as="script"><link rel="prefetch" href="/assets/native-method.html-4a5d20af.js" as="script"><link rel="prefetch" href="/assets/object-class.html-8060b8d4.js" as="script"><link rel="prefetch" href="/assets/package.html-f4bc06cb.js" as="script"><link rel="prefetch" href="/assets/polymorphism.html-dca0f598.js" as="script"><link rel="prefetch" href="/assets/static.html-d9a2201f.js" as="script"><link rel="prefetch" href="/assets/this-super.html-4ce10f05.js" as="script"><link rel="prefetch" href="/assets/var.html-67a5467f.js" as="script"><link rel="prefetch" href="/assets/IDEA-install-config.html-10e061f7.js" as="script"><link rel="prefetch" href="/assets/hello-world.html-b60cdafd.js" as="script"><link rel="prefetch" href="/assets/java-can-do-what.html-7db86990.js" as="script"><link rel="prefetch" href="/assets/java-history.html-c5514112.js" as="script"><link rel="prefetch" href="/assets/jdk-install-config.html-1c34f74a.js" as="script"><link rel="prefetch" href="/assets/index.html-2adfe042.js" as="script"><link rel="prefetch" href="/assets/what-is-java.html-9cb4fc8e.js" as="script"><link rel="prefetch" href="/assets/ali-java-shouce.html-f0404cbb.js" as="script"><link rel="prefetch" href="/assets/bat-shuati.html-a94acac5.js" as="script"><link rel="prefetch" href="/assets/github-java-jiaocheng-115-star.html-03ef8c34.js" as="script"><link rel="prefetch" href="/assets/java-concurrent.html-3327eb57.js" as="script"><link rel="prefetch" href="/assets/java-leetcode.html-7a961269.js" as="script"><link rel="prefetch" href="/assets/java.html-c88bc6e8.js" as="script"><link rel="prefetch" href="/assets/jianli.html-6290649d.js" as="script"><link rel="prefetch" href="/assets/os.html-5063f776.js" as="script"><link rel="prefetch" href="/assets/progit.html-62b68ce7.js" as="script"><link rel="prefetch" href="/assets/programmer-111.html-a7b4925f.js" as="script"><link rel="prefetch" href="/assets/index.html-ce4f28d7.js" as="script"><link rel="prefetch" href="/assets/shejimoshi.html-52dab855.js" as="script"><link rel="prefetch" href="/assets/yuanyifeng-c-language.html-af958bf3.js" as="script"><link rel="prefetch" href="/assets/install.html-eff0d7ce.js" as="script"><link rel="prefetch" href="/assets/redis-springboot.html-dec4eea6.js" as="script"><link rel="prefetch" href="/assets/rumen.html-38166c5d.js" as="script"><link rel="prefetch" href="/assets/xuebeng-chuantou-jichuan.html-40620940.js" as="script"><link rel="prefetch" href="/assets/computer-base.html-e160827f.js" as="script"><link rel="prefetch" href="/assets/http.html-2cdb2c0d.js" as="script"><link rel="prefetch" href="/assets/network-base.html-1b2d21c2.js" as="script"><link rel="prefetch" href="/assets/socket.html-89522d1e.js" as="script"><link rel="prefetch" href="/assets/Filter-Interceptor-Listener.html-080e449d.js" as="script"><link rel="prefetch" href="/assets/aop-log.html-b8b34fa1.js" as="script"><link rel="prefetch" href="/assets/cors.html-9a2d2ccb.js" as="script"><link rel="prefetch" href="/assets/docker.html-900ccc73.js" as="script"><link rel="prefetch" href="/assets/initializr.html-921624d3.js" as="script"><link rel="prefetch" href="/assets/ioc.html-64270fb3.js" as="script"><link rel="prefetch" href="/assets/jpa.html-dd4e23b1.js" as="script"><link rel="prefetch" href="/assets/jwt.html-5a88ec3f.js" as="script"><link rel="prefetch" href="/assets/linux-codingmore-run.html-8fa491e7.js" as="script"><link rel="prefetch" href="/assets/logback.html-5664afe0.js" as="script"><link rel="prefetch" href="/assets/lombok.html-a2b4ed5f.js" as="script"><link rel="prefetch" href="/assets/macos-codingmore-run.html-8f3d9d93.js" as="script"><link rel="prefetch" href="/assets/mybatis.html-fb39fc77.js" as="script"><link rel="prefetch" href="/assets/mysql-druid.html-9d79f586.js" as="script"><link rel="prefetch" href="/assets/oss.html-ccaef112.js" as="script"><link rel="prefetch" href="/assets/quartz.html-2940c054.js" as="script"><link rel="prefetch" href="/assets/springtask.html-f3c706ea.js" as="script"><link rel="prefetch" href="/assets/swagger.html-817a0df7.js" as="script"><link rel="prefetch" href="/assets/thymeleaf.html-d30ee7a2.js" as="script"><link rel="prefetch" href="/assets/tomcat.html-12c9c35e.js" as="script"><link rel="prefetch" href="/assets/transaction.html-2e12fa03.js" as="script"><link rel="prefetch" href="/assets/validator.html-f791dd01.js" as="script"><link rel="prefetch" href="/assets/windows-codingmore-run.html-a6a87b6a.js" as="script"><link rel="prefetch" href="/assets/builder-buffer.html-51d3c37e.js" as="script"><link rel="prefetch" href="/assets/constant-pool.html-c15bdbbe.js" as="script"><link rel="prefetch" href="/assets/equals.html-e05d6be1.js" as="script"><link rel="prefetch" href="/assets/immutable.html-6407d753.js" as="script"><link rel="prefetch" href="/assets/intern.html-7366429d.js" as="script"><link rel="prefetch" href="/assets/join.html-e9eb59c9.js" as="script"><link rel="prefetch" href="/assets/split.html-e2314065.js" as="script"><link rel="prefetch" href="/assets/string-source.html-a8774a9e.js" as="script"><link rel="prefetch" href="/assets/buy-cloud-server.html-3bd1675f.js" as="script"><link rel="prefetch" href="/assets/buy-domain.html-90d3f256.js" as="script"><link rel="prefetch" href="/assets/https-domain.html-9106901d.js" as="script"><link rel="prefetch" href="/assets/install-baota-mianban.html-68226428.js" as="script"><link rel="prefetch" href="/assets/record-domain.html-eb97e19c.js" as="script"><link rel="prefetch" href="/assets/tobebetterjavaer-wangzhan-shangxian.html-1f37291c.js" as="script"><link rel="prefetch" href="/assets/tupian-zhuanlian.html-a1c20ae9.js" as="script"><link rel="prefetch" href="/assets/BlockingQueue.html-2080d791.js" as="script"><link rel="prefetch" href="/assets/ConcurrentHashMap.html-d8cee0a5.js" as="script"><link rel="prefetch" href="/assets/ConcurrentLinkedQueue.html-41267914.js" as="script"><link rel="prefetch" href="/assets/CopyOnWriteArrayList.html-7f264606.js" as="script"><link rel="prefetch" href="/assets/CountDownLatch.html-bec30bfb.js" as="script"><link rel="prefetch" href="/assets/LockSupport.html-98325974.js" as="script"><link rel="prefetch" href="/assets/ReentrantReadWriteLock.html-a4e0aff2.js" as="script"><link rel="prefetch" href="/assets/ScheduledThreadPoolExecutor.html-5003a104.js" as="script"><link rel="prefetch" href="/assets/ThreadLocal.html-c5f3c9cf.js" as="script"><link rel="prefetch" href="/assets/Unsafe.html-ed1a7c83.js" as="script"><link rel="prefetch" href="/assets/ali-executors.html-e0e3b6f6.js" as="script"><link rel="prefetch" href="/assets/aqs.html-3646bd7a.js" as="script"><link rel="prefetch" href="/assets/atomic.html-87c43513.js" as="script"><link rel="prefetch" href="/assets/callable-future-futuretask.html-a865bea7.js" as="script"><link rel="prefetch" href="/assets/cas.html-4b568f79.js" as="script"><link rel="prefetch" href="/assets/condition.html-71d7e4db.js" as="script"><link rel="prefetch" href="/assets/fork-join.html-04600b7a.js" as="script"><link rel="prefetch" href="/assets/jmm.html-23e57735.js" as="script"><link rel="prefetch" href="/assets/lock.html-07580e46.js" as="script"><link rel="prefetch" href="/assets/map.html-cb918448.js" as="script"><link rel="prefetch" href="/assets/pianxiangsuo.html-97c1f207.js" as="script"><link rel="prefetch" href="/assets/pool.html-53e954b3.js" as="script"><link rel="prefetch" href="/assets/index.html-eb65e8db.js" as="script"><link rel="prefetch" href="/assets/reentrantLock.html-257c263e.js" as="script"><link rel="prefetch" href="/assets/shengchanzhe-xiaofeizhe.html-2900b5cf.js" as="script"><link rel="prefetch" href="/assets/suo.html-25ffef73.js" as="script"><link rel="prefetch" href="/assets/synchronized-1.html-59b53777.js" as="script"><link rel="prefetch" href="/assets/synchronized.html-1b1e425a.js" as="script"><link rel="prefetch" href="/assets/thread-bring-some-problem.html-f1d8e8bd.js" as="script"><link rel="prefetch" href="/assets/thread-group-and-thread-priority.html-d96ea2d3.js" as="script"><link rel="prefetch" href="/assets/thread-state-and-method.html-16ab48cc.js" as="script"><link rel="prefetch" href="/assets/volatile.html-3d4fb924.js" as="script"><link rel="prefetch" href="/assets/wangzhe-thread.html-bac72afe.js" as="script"><link rel="prefetch" href="/assets/why-need-thread.html-2f055e24.js" as="script"><link rel="prefetch" href="/assets/aliyun-shuaiguo-gongchengshi.html-a4b723b3.js" as="script"><link rel="prefetch" href="/assets/chadiansanhuo.html-32b9a4b5.js" as="script"><link rel="prefetch" href="/assets/chengxuyuannv-chonghui-java.html-1e43b407.js" as="script"><link rel="prefetch" href="/assets/daxue-nuli-jisuanji.html-1c7c9fd3.js" as="script"><link rel="prefetch" href="/assets/fumutuanju.html-58fc926c.js" as="script"><link rel="prefetch" href="/assets/20ren-it-quma.html-2253af1b.js" as="script"><link rel="prefetch" href="/assets/35-weiji.html-989f3eaa.js" as="script"><link rel="prefetch" href="/assets/408.html-9c67bc44.js" as="script"><link rel="prefetch" href="/assets/LearnCS-ByYourself.html-41c76a96.js" as="script"><link rel="prefetch" href="/assets/benkesheng-ali-tengxun.html-61762a45.js" as="script"><link rel="prefetch" href="/assets/chengxuyuan-fuye.html-07754bd4.js" as="script"><link rel="prefetch" href="/assets/electron-information-engineering.html-c9ba81a2.js" as="script"><link rel="prefetch" href="/assets/gaobingfa-jingyan-hsmcomputer.html-abe955ea.js" as="script"><link rel="prefetch" href="/assets/gaokao-zhiyuan-cs.html-a74f520b.js" as="script"><link rel="prefetch" href="/assets/hr-xinzi.html-c461d254.js" as="script"><link rel="prefetch" href="/assets/read-csapp.html-c81dbe58.js" as="script"><link rel="prefetch" href="/assets/ruhzfzdgzzcxcz.html-ac2ac670.js" as="script"><link rel="prefetch" href="/assets/test-programmer-read-books.html-c59f415a.js" as="script"><link rel="prefetch" href="/assets/xiaozhao-java-should-master.html-3b016e4f.js" as="script"><link rel="prefetch" href="/assets/algorithm.html-bc1bf956.js" as="script"><link rel="prefetch" href="/assets/android.html-13df7afa.js" as="script"><link rel="prefetch" href="/assets/bigdata.html-9da6e61f.js" as="script"><link rel="prefetch" href="/assets/c.html-76598af7.js" as="script"><link rel="prefetch" href="/assets/ccc.html-67ddde2d.js" as="script"><link rel="prefetch" href="/assets/donet.html-6d3a625b.js" as="script"><link rel="prefetch" href="/assets/go.html-26842a9b.js" as="script"><link rel="prefetch" href="/assets/lanqiaobei.html-4efe9d76.js" as="script"><link rel="prefetch" href="/assets/mysql.html-46d80b00.js" as="script"><link rel="prefetch" href="/assets/os.html-9f52053d.js" as="script"><link rel="prefetch" href="/assets/python.html-c90feb5c.js" as="script"><link rel="prefetch" href="/assets/qianduan.html-77a91ee4.js" as="script"><link rel="prefetch" href="/assets/index.html-bc80a12a.js" as="script"><link rel="prefetch" href="/assets/redis.html-b450161c.js" as="script"><link rel="prefetch" href="/assets/august.html-0b6d1f90.js" as="script"><link rel="prefetch" href="/assets/first.html-da35e9e7.js" as="script"><link rel="prefetch" href="/assets/java-mianshi-zhinan.html-6c05b755.js" as="script"><link rel="prefetch" href="/assets/jianli.html-b74c3d24.js" as="script"><link rel="prefetch" href="/assets/july.html-d321c3a0.js" as="script"><link rel="prefetch" href="/assets/june.html-73a1e8b1.js" as="script"><link rel="prefetch" href="/assets/map.html-caf41b74.js" as="script"><link rel="prefetch" href="/assets/may.html-84498c7a.js" as="script"><link rel="prefetch" href="/assets/mianshi.html-a4c02e87.js" as="script"><link rel="prefetch" href="/assets/paicoding.html-b366035d.js" as="script"><link rel="prefetch" href="/assets/index.html-705c3853.js" as="script"><link rel="prefetch" href="/assets/jibenjieshao.html-f28197ee.js" as="script"><link rel="prefetch" href="/assets/luoczbmsddyb.html-f5178ce0.js" as="script"><link rel="prefetch" href="/assets/miansmtgl.html-88986cc7.js" as="script"><link rel="prefetch" href="/assets/xzbztdncdlxgljsjq.html-843568aa.js" as="script"><link rel="prefetch" href="/assets/youdxzhhmjzlycfx.html-3e2e4207.js" as="script"><link rel="prefetch" href="/assets/zijxjjdyfqzgl.html-01477be0.js" as="script"><link rel="prefetch" href="/assets/javase.html-951d0cd7.js" as="script"><link rel="prefetch" href="/assets/collection.html-c0fcb04a.js" as="script"><link rel="prefetch" href="/assets/fenbushi.html-e332b925.js" as="script"><link rel="prefetch" href="/assets/javase.html-c8a82362.js" as="script"><link rel="prefetch" href="/assets/javathread.html-d213607b.js" as="script"><link rel="prefetch" href="/assets/jvm.html-b6a1b1d0.js" as="script"><link rel="prefetch" href="/assets/mybatis.html-c5e4ca4b.js" as="script"><link rel="prefetch" href="/assets/mysql.html-60e96142.js" as="script"><link rel="prefetch" href="/assets/network.html-28a40cea.js" as="script"><link rel="prefetch" href="/assets/nixi.html-c0144938.js" as="script"><link rel="prefetch" href="/assets/os.html-a0fb8f0d.js" as="script"><link rel="prefetch" href="/assets/redis.html-b239471f.js" as="script"><link rel="prefetch" href="/assets/rocketmq.html-86ff123e.js" as="script"><link rel="prefetch" href="/assets/spring.html-6c81fb39.js" as="script"><link rel="prefetch" href="/assets/weifuwu.html-85492537.js" as="script"><link rel="prefetch" href="/assets/jvm.html-dfcf4e0f.js" as="script"><link rel="prefetch" href="/assets/thread.html-92ad35e2.js" as="script"><link rel="prefetch" href="/assets/yitiaolong.html-3a9fd9b7.js" as="script"><link rel="prefetch" href="/assets/404.html-73858f58.js" as="script"><link rel="prefetch" href="/assets/index.html-e39f9947.js" as="script"><link rel="prefetch" href="/assets/index.html-522021f4.js" as="script"><link rel="prefetch" href="/assets/index.html-d3ba01c3.js" as="script"><link rel="prefetch" href="/assets/index.html-5dd50ac9.js" as="script"><link rel="prefetch" href="/assets/index.html-d40b6d34.js" as="script"><link rel="prefetch" href="/assets/index.html-431ec1b9.js" as="script"><link rel="prefetch" href="/assets/index.html-7dbe085d.js" as="script"><link rel="prefetch" href="/assets/index.html-24e8a73f.js" as="script"><link rel="prefetch" href="/assets/index.html-1575064b.js" as="script"><link rel="prefetch" href="/assets/index.html-2cbc852a.js" as="script"><link rel="prefetch" href="/assets/index.html-17787a20.js" as="script"><link rel="prefetch" href="/assets/index.html-6089ddb6.js" as="script"><link rel="prefetch" href="/assets/index.html-2d3a682a.js" as="script"><link rel="prefetch" href="/assets/index.html-5db156a2.js" as="script"><link rel="prefetch" href="/assets/index.html-ef7c0ff6.js" as="script"><link rel="prefetch" href="/assets/index.html-9cb6404f.js" as="script"><link rel="prefetch" href="/assets/index.html-a07e2b9c.js" as="script"><link rel="prefetch" href="/assets/index.html-e2551c5b.js" as="script"><link rel="prefetch" href="/assets/index.html-7cdc8698.js" as="script"><link rel="prefetch" href="/assets/index.html-49bd7cf7.js" as="script"><link rel="prefetch" href="/assets/index.html-005dcef4.js" as="script"><link rel="prefetch" href="/assets/index.html-cb60177c.js" as="script"><link rel="prefetch" href="/assets/index.html-4ebc5046.js" as="script"><link rel="prefetch" href="/assets/index.html-4f24b19d.js" as="script"><link rel="prefetch" href="/assets/index.html-dfbba271.js" as="script"><link rel="prefetch" href="/assets/index.html-28a746cc.js" as="script"><link rel="prefetch" href="/assets/index.html-665779fd.js" as="script"><link rel="prefetch" href="/assets/index.html-2ceb269f.js" as="script"><link rel="prefetch" href="/assets/index.html-6a19db7b.js" as="script"><link rel="prefetch" href="/assets/index.html-4c31b34a.js" as="script"><link rel="prefetch" href="/assets/index.html-3a5471bb.js" as="script"><link rel="prefetch" href="/assets/index.html-fbec7aca.js" as="script"><link rel="prefetch" href="/assets/index.html-12a1433c.js" as="script"><link rel="prefetch" href="/assets/index.html-a6afdfd8.js" as="script"><link rel="prefetch" href="/assets/index.html-7e969708.js" as="script"><link rel="prefetch" href="/assets/index.html-8641f28b.js" as="script"><link rel="prefetch" href="/assets/index.html-4679ce1f.js" as="script"><link rel="prefetch" href="/assets/index.html-9928b19e.js" as="script"><link rel="prefetch" href="/assets/index.html-a593ac7f.js" as="script"><link rel="prefetch" href="/assets/index.html-5889ccca.js" as="script"><link rel="prefetch" href="/assets/index.html-f701e4d1.js" as="script"><link rel="prefetch" href="/assets/blog.html-61932911.js" as="script"><link rel="prefetch" href="/assets/home.html-dbc6efde.js" as="script"><link rel="prefetch" href="/assets/bzhan-10wan.html-207b37a8.js" as="script"><link rel="prefetch" href="/assets/csdn-1000wan.html-5fae704f.js" as="script"><link rel="prefetch" href="/assets/index.html-926856cb.js" as="script"><link rel="prefetch" href="/assets/zhihu-1000wan.html-ab1664ec.js" as="script"><link rel="prefetch" href="/assets/array.html-4b5a76fb.js" as="script"><link rel="prefetch" href="/assets/double-array.html-5ab66f24.js" as="script"><link rel="prefetch" href="/assets/print.html-7f5b8675.js" as="script"><link rel="prefetch" href="/assets/basic-data-type.html-622a3e1b.js" as="script"><link rel="prefetch" href="/assets/basic-exercise.html-1f24d5d7.js" as="script"><link rel="prefetch" href="/assets/bigdecimal-biginteger.html-505b7626.js" as="script"><link rel="prefetch" href="/assets/flow-control.html-d67b5edb.js" as="script"><link rel="prefetch" href="/assets/javadoc.html-a1fa8fed.js" as="script"><link rel="prefetch" href="/assets/operator.html-d6ab9b89.js" as="script"><link rel="prefetch" href="/assets/type-cast.html-a23855e7.js" as="script"><link rel="prefetch" href="/assets/48-keywords.html-b7599a95.js" as="script"><link rel="prefetch" href="/assets/Overriding.html-17ba525c.js" as="script"><link rel="prefetch" href="/assets/annotation.html-19333c67.js" as="script"><link rel="prefetch" href="/assets/box.html-01c274d8.js" as="script"><link rel="prefetch" href="/assets/class-object.html-f57be11c.js" as="script"><link rel="prefetch" href="/assets/comparable-omparator.html-9ecb0a29.js" as="script"><link rel="prefetch" href="/assets/deep-copy.html-f9fc4421.js" as="script"><link rel="prefetch" href="/assets/equals-hashcode.html-1ce67509.js" as="script"><link rel="prefetch" href="/assets/fanshe.html-d07519b8.js" as="script"><link rel="prefetch" href="/assets/generic.html-581837dc.js" as="script"><link rel="prefetch" href="/assets/hashcode.html-082bb1e8.js" as="script"><link rel="prefetch" href="/assets/immutable.html-8f4e8765.js" as="script"><link rel="prefetch" href="/assets/instanceof-jvm.html-4f6a2b64.js" as="script"><link rel="prefetch" href="/assets/instanceof.html-2b2af03c.js" as="script"><link rel="prefetch" href="/assets/int-cache.html-d711fd3d.js" as="script"><link rel="prefetch" href="/assets/java-naming.html-78c19dfa.js" as="script"><link rel="prefetch" href="/assets/java-unicode.html-108e8c99.js" as="script"><link rel="prefetch" href="/assets/jdk-while-for-wuxian-xunhuan.html-232b28dd.js" as="script"><link rel="prefetch" href="/assets/jdk9-char-byte-string.html-466cdc57.js" as="script"><link rel="prefetch" href="/assets/override-overload.html-b8029790.js" as="script"><link rel="prefetch" href="/assets/pass-by-value.html-1286d60a.js" as="script"><link rel="prefetch" href="/assets/true-generic.html-e9fb865e.js" as="script"><link rel="prefetch" href="/assets/varables.html-7a847999.js" as="script"><link rel="prefetch" href="/assets/beijing.html-38abba30.js" as="script"><link rel="prefetch" href="/assets/chengdu.html-0a2a976b.js" as="script"><link rel="prefetch" href="/assets/guangzhou.html-f8bcfecd.js" as="script"><link rel="prefetch" href="/assets/hangzhou.html-4fac9f96.js" as="script"><link rel="prefetch" href="/assets/jinan.html-68950a32.js" as="script"><link rel="prefetch" href="/assets/nanjing.html-191777a0.js" as="script"><link rel="prefetch" href="/assets/qingdao.html-94dfc6e0.js" as="script"><link rel="prefetch" href="/assets/shenzhen.html-d65ea7c6.js" as="script"><link rel="prefetch" href="/assets/suzhou.html-7853fd76.js" as="script"><link rel="prefetch" href="/assets/wuhan.html-285b6b4e.js" as="script"><link rel="prefetch" href="/assets/xian.html-0c918d48.js" as="script"><link rel="prefetch" href="/assets/zhengzhou.html-f85619a8.js" as="script"><link rel="prefetch" href="/assets/PriorityQueue.html-c108274b.js" as="script"><link rel="prefetch" href="/assets/WeakHashMap.html-3adb9507.js" as="script"><link rel="prefetch" href="/assets/arraydeque.html-91482594.js" as="script"><link rel="prefetch" href="/assets/arraylist.html-62d370e8.js" as="script"><link rel="prefetch" href="/assets/fail-fast.html-dbf283e6.js" as="script"><link rel="prefetch" href="/assets/gailan.html-869c181a.js" as="script"><link rel="prefetch" href="/assets/hashmap.html-2ae1a414.js" as="script"><link rel="prefetch" href="/assets/iterator-iterable.html-c54bc4c9.js" as="script"><link rel="prefetch" href="/assets/linkedhashmap.html-caa46690.js" as="script"><link rel="prefetch" href="/assets/linkedlist.html-0594f850.js" as="script"><link rel="prefetch" href="/assets/list-war-2.html-5da378cf.js" as="script"><link rel="prefetch" href="/assets/time-complexity.html-b93cb9f0.js" as="script"><link rel="prefetch" href="/assets/treemap.html-1d5b8556.js" as="script"><link rel="prefetch" href="/assets/Objects.html-b625544e.js" as="script"><link rel="prefetch" href="/assets/StringUtils.html-59bd1d8a.js" as="script"><link rel="prefetch" href="/assets/arrays.html-a45f5617.js" as="script"><link rel="prefetch" href="/assets/collections.html-9668d354.js" as="script"><link rel="prefetch" href="/assets/guava.html-4533d654.js" as="script"><link rel="prefetch" href="/assets/hutool.html-1636cf58.js" as="script"><link rel="prefetch" href="/assets/scanner.html-9b6946db.js" as="script"><link rel="prefetch" href="/assets/utils.html-7041f39d.js" as="script"><link rel="prefetch" href="/assets/os.html-aee33541.js" as="script"><link rel="prefetch" href="/assets/wangluo.html-2fa87136.js" as="script"><link rel="prefetch" href="/assets/history.html-8f437b01.js" as="script"><link rel="prefetch" href="/assets/javabooks.html-6339135a.js" as="script"><link rel="prefetch" href="/assets/learn-jianyi.html-e7b30312.js" as="script"><link rel="prefetch" href="/assets/nicearticle.html-496e581b.js" as="script"><link rel="prefetch" href="/assets/rumen.html-da046574.js" as="script"><link rel="prefetch" href="/assets/gailan.html-83bb91a1.js" as="script"><link rel="prefetch" href="/assets/npe.html-09cdb6ec.js" as="script"><link rel="prefetch" href="/assets/shijian.html-9cd76046.js" as="script"><link rel="prefetch" href="/assets/try-catch-xingneng.html-6bf702d5.js" as="script"><link rel="prefetch" href="/assets/try-with-resources.html-250cc37f.js" as="script"><link rel="prefetch" href="/assets/git-qiyuan.html-3381d139.js" as="script"><link rel="prefetch" href="/assets/progit.html-6c610324.js" as="script"><link rel="prefetch" href="/assets/DBeaver.html-c2f0a140.js" as="script"><link rel="prefetch" href="/assets/brew.html-d8622230.js" as="script"><link rel="prefetch" href="/assets/chiner.html-10d8a95d.js" as="script"><link rel="prefetch" href="/assets/choco.html-11705b9e.js" as="script"><link rel="prefetch" href="/assets/fastjson.html-b93a0fdc.js" as="script"><link rel="prefetch" href="/assets/forest.html-1426f82a.js" as="script"><link rel="prefetch" href="/assets/gson.html-0d2c65b9.js" as="script"><link rel="prefetch" href="/assets/jackson.html-1aa47ad1.js" as="script"><link rel="prefetch" href="/assets/junit.html-279268c9.js" as="script"><link rel="prefetch" href="/assets/knife4j.html-13c41d96.js" as="script"><link rel="prefetch" href="/assets/log4j.html-ae990373.js" as="script"><link rel="prefetch" href="/assets/log4j2.html-0350f28e.js" as="script"><link rel="prefetch" href="/assets/logback.html-a4f76b8e.js" as="script"><link rel="prefetch" href="/assets/others.html-a3f7843b.js" as="script"><link rel="prefetch" href="/assets/slf4j.html-7a945f76.js" as="script"><link rel="prefetch" href="/assets/tabby.html-36f0ef5b.js" as="script"><link rel="prefetch" href="/assets/warp.html-3435635e.js" as="script"><link rel="prefetch" href="/assets/windterm.html-0cb1396a.js" as="script"><link rel="prefetch" href="/assets/4-debug-skill.html-e15d9a82.js" as="script"><link rel="prefetch" href="/assets/shenji-chajian-10.html-c2119387.js" as="script"><link rel="prefetch" href="/assets/xechat.html-8af6c7ec.js" as="script"><link rel="prefetch" href="/assets/dubbo-17.html-0ec9bcc2.js" as="script"><link rel="prefetch" href="/assets/java-34.html-2ca81a0d.js" as="script"><link rel="prefetch" href="/assets/java-basic-baguwen.html-52c1067f.js" as="script"><link rel="prefetch" href="/assets/java-hashmap-13.html-23f9ef2b.js" as="script"><link rel="prefetch" href="/assets/java-jvm-baguwen.html-20252ac0.js" as="script"><link rel="prefetch" href="/assets/java-thread-baguwen.html-3042b4fa.js" as="script"><link rel="prefetch" href="/assets/kafka-40.html-aaef16f2.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-bigfile-miaochuan.html-78a151c7.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-fenkufenbiao.html-be1d0f32.js" as="script"><link rel="prefetch" href="/assets/mianshiguan-youhuiquan.html-84b1950d.js" as="script"><link rel="prefetch" href="/assets/mysql-60.html-5c3c1e8e.js" as="script"><link rel="prefetch" href="/assets/mysql-suoyin-15.html-64963f9f.js" as="script"><link rel="prefetch" href="/assets/nginx-40.html-8a284624.js" as="script"><link rel="prefetch" href="/assets/redis-12.html-e452b67a.js" as="script"><link rel="prefetch" href="/assets/Serializbale.html-d28dc85a.js" as="script"><link rel="prefetch" href="/assets/buffer.html-730864bc.js" as="script"><link rel="prefetch" href="/assets/char-byte.html-0f6cf841.js" as="script"><link rel="prefetch" href="/assets/file-path.html-ce99a528.js" as="script"><link rel="prefetch" href="/assets/print.html-da1239d6.js" as="script"><link rel="prefetch" href="/assets/reader-writer.html-fc6cd577.js" as="script"><link rel="prefetch" href="/assets/serialize.html-9e323284.js" as="script"><link rel="prefetch" href="/assets/shangtou.html-896bf38f.js" as="script"><link rel="prefetch" href="/assets/stream.html-487f5240.js" as="script"><link rel="prefetch" href="/assets/transient.html-4c226ace.js" as="script"><link rel="prefetch" href="/assets/Lambda.html-f8ffb6cf.js" as="script"><link rel="prefetch" href="/assets/java14.html-a9f82df9.js" as="script"><link rel="prefetch" href="/assets/optional.html-9b0ab081.js" as="script"><link rel="prefetch" href="/assets/stream.html-f84755a9.js" as="script"><link rel="prefetch" href="/assets/asm.html-a27b4d17.js" as="script"><link rel="prefetch" href="/assets/bytecode.html-509be837.js" as="script"><link rel="prefetch" href="/assets/class-file-jiegou.html-a6c362d6.js" as="script"><link rel="prefetch" href="/assets/class-load.html-979073ad.js" as="script"><link rel="prefetch" href="/assets/compile-jdk.html-90b74b68.js" as="script"><link rel="prefetch" href="/assets/cpu-percent-100.html-06a45b36.js" as="script"><link rel="prefetch" href="/assets/garbage-collector.html-b6ade488.js" as="script"><link rel="prefetch" href="/assets/gc-collector.html-e1c7c730.js" as="script"><link rel="prefetch" href="/assets/gc.html-f5bdbb53.js" as="script"><link rel="prefetch" href="/assets/how-jvm-run-zijiema-zhiling.html-aa3f999c.js" as="script"><link rel="prefetch" href="/assets/how-run-java-code.html-fa670d43.js" as="script"><link rel="prefetch" href="/assets/hsdb.html-a59f7dd8.js" as="script"><link rel="prefetch" href="/assets/jit.html-e87949bc.js" as="script"><link rel="prefetch" href="/assets/meituan-9-gc.html-fcd52718.js" as="script"><link rel="prefetch" href="/assets/neicun-jiegou.html-21032579.js" as="script"><link rel="prefetch" href="/assets/oom.html-b16bb1f4.js" as="script"><link rel="prefetch" href="/assets/problem-tools.html-9a065329.js" as="script"><link rel="prefetch" href="/assets/index.html-cefc25e8.js" as="script"><link rel="prefetch" href="/assets/stack-frame.html-101da16c.js" as="script"><link rel="prefetch" href="/assets/tujie-gc.html-dfceda31.js" as="script"><link rel="prefetch" href="/assets/vm-stack-register.html-5184719f.js" as="script"><link rel="prefetch" href="/assets/what-happen-when-javac.html-7555b559.js" as="script"><link rel="prefetch" href="/assets/what-is-jvm.html-45dac997.js" as="script"><link rel="prefetch" href="/assets/whereis-the-object.html-d5a65b84.js" as="script"><link rel="prefetch" href="/assets/zijiema-zhiling.html-458e670b.js" as="script"><link rel="prefetch" href="/assets/zongjie.html-9d344848.js" as="script"><link rel="prefetch" href="/assets/auto-generator.html-0b548f6e.js" as="script"><link rel="prefetch" href="/assets/index.html-f9f58bef.js" as="script"><link rel="prefetch" href="/assets/yuneban-wangyiyunyinyue.html-33d6ae2b.js" as="script"><link rel="prefetch" href="/assets/maven.html-a63902cb.js" as="script"><link rel="prefetch" href="/assets/chengxyspnhxagzl.html-a1641c8d.js" as="script"><link rel="prefetch" href="/assets/huanxgzl.html-c3e4703d.js" as="script"><link rel="prefetch" href="/assets/quzjlsspdx.html-c8c71f39.js" as="script"><link rel="prefetch" href="/assets/shanganaliyun.html-d4d92628.js" as="script"><link rel="prefetch" href="/assets/shezynmjfxhelmtttjddd.html-19a0f3a5.js" as="script"><link rel="prefetch" href="/assets/xuelybdzheloffer.html-a20fb75c.js" as="script"><link rel="prefetch" href="/assets/zheisnylzldhzd.html-8f0d5192.js" as="script"><link rel="prefetch" href="/assets/api-wangguan.html-73d2b4a4.js" as="script"><link rel="prefetch" href="/assets/rumen.html-cb29da1a.js" as="script"><link rel="prefetch" href="/assets/100-budiushi.html-ca66a040.js" as="script"><link rel="prefetch" href="/assets/kafka.html-89e75776.js" as="script"><link rel="prefetch" href="/assets/rabbitmq-rumen.html-0494ef50.js" as="script"><link rel="prefetch" href="/assets/install.html-ab468e25.js" as="script"><link rel="prefetch" href="/assets/lijie-shiwu.html-c7d9a583.js" as="script"><link rel="prefetch" href="/assets/redis-shuju-yizhixing.html-06e46a68.js" as="script"><link rel="prefetch" href="/assets/shiwu-shixian.html-cc810518.js" as="script"><link rel="prefetch" href="/assets/rumen.html-6ad9d71c.js" as="script"><link rel="prefetch" href="/assets/nginx.html-4465f299.js" as="script"><link rel="prefetch" href="/assets/BIONIOAIO.html-d34b1c25.js" as="script"><link rel="prefetch" href="/assets/buffer-channel.html-b33aad49.js" as="script"><link rel="prefetch" href="/assets/moxing.html-35745e5b.js" as="script"><link rel="prefetch" href="/assets/network-connect.html-cb0c5230.js" as="script"><link rel="prefetch" href="/assets/nio-better-io.html-1d3fd99d.js" as="script"><link rel="prefetch" href="/assets/paths-files.html-1934f88e.js" as="script"><link rel="prefetch" href="/assets/abstract-vs-interface.html-2550a9ff.js" as="script"><link rel="prefetch" href="/assets/abstract.html-dc7556e2.js" as="script"><link rel="prefetch" href="/assets/access-control.html-db229764.js" as="script"><link rel="prefetch" href="/assets/code-init.html-4c6bd9f6.js" as="script"><link rel="prefetch" href="/assets/construct.html-5cf3b652.js" as="script"><link rel="prefetch" href="/assets/encapsulation-inheritance-polymorphism.html-d9c611c6.js" as="script"><link rel="prefetch" href="/assets/encapsulation.html-cfeccb1f.js" as="script"><link rel="prefetch" href="/assets/extends-bigsai.html-c73ffc93.js" as="script"><link rel="prefetch" href="/assets/final.html-551d9306.js" as="script"><link rel="prefetch" href="/assets/inner-class.html-53a6e848.js" as="script"><link rel="prefetch" href="/assets/interface.html-7fd97fa9.js" as="script"><link rel="prefetch" href="/assets/method.html-47751aa8.js" as="script"><link rel="prefetch" href="/assets/native-method.html-b1cd9ad2.js" as="script"><link rel="prefetch" href="/assets/object-class.html-e92bb37f.js" as="script"><link rel="prefetch" href="/assets/package.html-554a9c5f.js" as="script"><link rel="prefetch" href="/assets/polymorphism.html-36d25db0.js" as="script"><link rel="prefetch" href="/assets/static.html-ee7e5579.js" as="script"><link rel="prefetch" href="/assets/this-super.html-837bd57c.js" as="script"><link rel="prefetch" href="/assets/var.html-85c2a8c5.js" as="script"><link rel="prefetch" href="/assets/IDEA-install-config.html-3b55c643.js" as="script"><link rel="prefetch" href="/assets/hello-world.html-f7f17d28.js" as="script"><link rel="prefetch" href="/assets/java-can-do-what.html-6ef99c3b.js" as="script"><link rel="prefetch" href="/assets/java-history.html-ca3d588a.js" as="script"><link rel="prefetch" href="/assets/jdk-install-config.html-06ed450c.js" as="script"><link rel="prefetch" href="/assets/index.html-27245dee.js" as="script"><link rel="prefetch" href="/assets/what-is-java.html-9192d343.js" as="script"><link rel="prefetch" href="/assets/ali-java-shouce.html-68acf06a.js" as="script"><link rel="prefetch" href="/assets/bat-shuati.html-dde90da6.js" as="script"><link rel="prefetch" href="/assets/github-java-jiaocheng-115-star.html-62f3dbea.js" as="script"><link rel="prefetch" href="/assets/java-concurrent.html-d860912f.js" as="script"><link rel="prefetch" href="/assets/java-leetcode.html-02fa10a3.js" as="script"><link rel="prefetch" href="/assets/java.html-fbcbaf70.js" as="script"><link rel="prefetch" href="/assets/jianli.html-c5089148.js" as="script"><link rel="prefetch" href="/assets/os.html-9aade61d.js" as="script"><link rel="prefetch" href="/assets/progit.html-142f7bdc.js" as="script"><link rel="prefetch" href="/assets/programmer-111.html-788937b1.js" as="script"><link rel="prefetch" href="/assets/index.html-e544b19c.js" as="script"><link rel="prefetch" href="/assets/shejimoshi.html-0a160e90.js" as="script"><link rel="prefetch" href="/assets/yuanyifeng-c-language.html-40810d87.js" as="script"><link rel="prefetch" href="/assets/install.html-aaa885c2.js" as="script"><link rel="prefetch" href="/assets/redis-springboot.html-7025d0ad.js" as="script"><link rel="prefetch" href="/assets/rumen.html-f35f48ff.js" as="script"><link rel="prefetch" href="/assets/xuebeng-chuantou-jichuan.html-94807cb9.js" as="script"><link rel="prefetch" href="/assets/computer-base.html-7159fb4b.js" as="script"><link rel="prefetch" href="/assets/http.html-9ca9a687.js" as="script"><link rel="prefetch" href="/assets/network-base.html-46729e10.js" as="script"><link rel="prefetch" href="/assets/socket.html-40f1e464.js" as="script"><link rel="prefetch" href="/assets/Filter-Interceptor-Listener.html-76ffed9e.js" as="script"><link rel="prefetch" href="/assets/aop-log.html-5d003047.js" as="script"><link rel="prefetch" href="/assets/cors.html-a3465572.js" as="script"><link rel="prefetch" href="/assets/docker.html-79627aba.js" as="script"><link rel="prefetch" href="/assets/initializr.html-1122fd7b.js" as="script"><link rel="prefetch" href="/assets/ioc.html-c6c81028.js" as="script"><link rel="prefetch" href="/assets/jpa.html-556bea95.js" as="script"><link rel="prefetch" href="/assets/jwt.html-46eb8083.js" as="script"><link rel="prefetch" href="/assets/linux-codingmore-run.html-28fce41d.js" as="script"><link rel="prefetch" href="/assets/logback.html-439e0723.js" as="script"><link rel="prefetch" href="/assets/lombok.html-27e7923d.js" as="script"><link rel="prefetch" href="/assets/macos-codingmore-run.html-89b968cc.js" as="script"><link rel="prefetch" href="/assets/mybatis.html-0e0aa322.js" as="script"><link rel="prefetch" href="/assets/mysql-druid.html-8e7c7bf9.js" as="script"><link rel="prefetch" href="/assets/oss.html-7f89b95e.js" as="script"><link rel="prefetch" href="/assets/quartz.html-88f290d3.js" as="script"><link rel="prefetch" href="/assets/springtask.html-80574486.js" as="script"><link rel="prefetch" href="/assets/swagger.html-43f1aa4a.js" as="script"><link rel="prefetch" href="/assets/thymeleaf.html-347ed227.js" as="script"><link rel="prefetch" href="/assets/tomcat.html-6aabcb46.js" as="script"><link rel="prefetch" href="/assets/transaction.html-16bd5d75.js" as="script"><link rel="prefetch" href="/assets/validator.html-69224155.js" as="script"><link rel="prefetch" href="/assets/windows-codingmore-run.html-11305f05.js" as="script"><link rel="prefetch" href="/assets/builder-buffer.html-978126df.js" as="script"><link rel="prefetch" href="/assets/constant-pool.html-738dca52.js" as="script"><link rel="prefetch" href="/assets/equals.html-9d050675.js" as="script"><link rel="prefetch" href="/assets/immutable.html-73215224.js" as="script"><link rel="prefetch" href="/assets/intern.html-e4dba897.js" as="script"><link rel="prefetch" href="/assets/join.html-23544566.js" as="script"><link rel="prefetch" href="/assets/split.html-7d15004a.js" as="script"><link rel="prefetch" href="/assets/string-source.html-30fca56d.js" as="script"><link rel="prefetch" href="/assets/buy-cloud-server.html-a5496c2f.js" as="script"><link rel="prefetch" href="/assets/buy-domain.html-bcc0391b.js" as="script"><link rel="prefetch" href="/assets/https-domain.html-eee0afb6.js" as="script"><link rel="prefetch" href="/assets/install-baota-mianban.html-74b4be16.js" as="script"><link rel="prefetch" href="/assets/record-domain.html-8936176f.js" as="script"><link rel="prefetch" href="/assets/tobebetterjavaer-wangzhan-shangxian.html-c3077ac6.js" as="script"><link rel="prefetch" href="/assets/tupian-zhuanlian.html-42a59b11.js" as="script"><link rel="prefetch" href="/assets/BlockingQueue.html-b0c034d2.js" as="script"><link rel="prefetch" href="/assets/ConcurrentHashMap.html-9001ea8c.js" as="script"><link rel="prefetch" href="/assets/ConcurrentLinkedQueue.html-c07a5745.js" as="script"><link rel="prefetch" href="/assets/CopyOnWriteArrayList.html-b42d8252.js" as="script"><link rel="prefetch" href="/assets/CountDownLatch.html-7cfa05ec.js" as="script"><link rel="prefetch" href="/assets/LockSupport.html-a1d2eb45.js" as="script"><link rel="prefetch" href="/assets/ReentrantReadWriteLock.html-44e17940.js" as="script"><link rel="prefetch" href="/assets/ScheduledThreadPoolExecutor.html-a64f081f.js" as="script"><link rel="prefetch" href="/assets/ThreadLocal.html-87007e54.js" as="script"><link rel="prefetch" href="/assets/Unsafe.html-2c1b31a8.js" as="script"><link rel="prefetch" href="/assets/ali-executors.html-cb2f0e37.js" as="script"><link rel="prefetch" href="/assets/aqs.html-7888738b.js" as="script"><link rel="prefetch" href="/assets/atomic.html-03949ff4.js" as="script"><link rel="prefetch" href="/assets/callable-future-futuretask.html-69f2101a.js" as="script"><link rel="prefetch" href="/assets/cas.html-d6ff9288.js" as="script"><link rel="prefetch" href="/assets/condition.html-32b687eb.js" as="script"><link rel="prefetch" href="/assets/fork-join.html-4b2098bf.js" as="script"><link rel="prefetch" href="/assets/jmm.html-b7b68ca4.js" as="script"><link rel="prefetch" href="/assets/lock.html-a4fe2e03.js" as="script"><link rel="prefetch" href="/assets/map.html-1fd99959.js" as="script"><link rel="prefetch" href="/assets/pianxiangsuo.html-bbcfa014.js" as="script"><link rel="prefetch" href="/assets/pool.html-69d034b3.js" as="script"><link rel="prefetch" href="/assets/index.html-6264830a.js" as="script"><link rel="prefetch" href="/assets/reentrantLock.html-f874ce11.js" as="script"><link rel="prefetch" href="/assets/shengchanzhe-xiaofeizhe.html-94f4eb13.js" as="script"><link rel="prefetch" href="/assets/suo.html-c15d28ca.js" as="script"><link rel="prefetch" href="/assets/synchronized-1.html-facafa55.js" as="script"><link rel="prefetch" href="/assets/synchronized.html-5017e01c.js" as="script"><link rel="prefetch" href="/assets/thread-bring-some-problem.html-dc72ddac.js" as="script"><link rel="prefetch" href="/assets/thread-group-and-thread-priority.html-d322495b.js" as="script"><link rel="prefetch" href="/assets/thread-state-and-method.html-34d9c4b9.js" as="script"><link rel="prefetch" href="/assets/volatile.html-5db2f6ad.js" as="script"><link rel="prefetch" href="/assets/wangzhe-thread.html-ab0de543.js" as="script"><link rel="prefetch" href="/assets/why-need-thread.html-8785a679.js" as="script"><link rel="prefetch" href="/assets/aliyun-shuaiguo-gongchengshi.html-fd990404.js" as="script"><link rel="prefetch" href="/assets/chadiansanhuo.html-35f383f7.js" as="script"><link rel="prefetch" href="/assets/chengxuyuannv-chonghui-java.html-277eb75d.js" as="script"><link rel="prefetch" href="/assets/daxue-nuli-jisuanji.html-4777944b.js" as="script"><link rel="prefetch" href="/assets/fumutuanju.html-83da5e5c.js" as="script"><link rel="prefetch" href="/assets/20ren-it-quma.html-ef877692.js" as="script"><link rel="prefetch" href="/assets/35-weiji.html-fca9d231.js" as="script"><link rel="prefetch" href="/assets/408.html-72f0e6c0.js" as="script"><link rel="prefetch" href="/assets/LearnCS-ByYourself.html-d330ed76.js" as="script"><link rel="prefetch" href="/assets/benkesheng-ali-tengxun.html-a86228c1.js" as="script"><link rel="prefetch" href="/assets/chengxuyuan-fuye.html-59203051.js" as="script"><link rel="prefetch" href="/assets/electron-information-engineering.html-9e6ae335.js" as="script"><link rel="prefetch" href="/assets/gaobingfa-jingyan-hsmcomputer.html-fdc60aa0.js" as="script"><link rel="prefetch" href="/assets/gaokao-zhiyuan-cs.html-a63b5ee9.js" as="script"><link rel="prefetch" href="/assets/hr-xinzi.html-d0179ee6.js" as="script"><link rel="prefetch" href="/assets/read-csapp.html-99b6cb59.js" as="script"><link rel="prefetch" href="/assets/ruhzfzdgzzcxcz.html-2213a27e.js" as="script"><link rel="prefetch" href="/assets/test-programmer-read-books.html-496c0ae3.js" as="script"><link rel="prefetch" href="/assets/xiaozhao-java-should-master.html-c8a34cda.js" as="script"><link rel="prefetch" href="/assets/algorithm.html-eaaeb63c.js" as="script"><link rel="prefetch" href="/assets/android.html-fe91a5cb.js" as="script"><link rel="prefetch" href="/assets/bigdata.html-e5672d2e.js" as="script"><link rel="prefetch" href="/assets/c.html-4af9de03.js" as="script"><link rel="prefetch" href="/assets/ccc.html-5fcf809c.js" as="script"><link rel="prefetch" href="/assets/donet.html-076a2aad.js" as="script"><link rel="prefetch" href="/assets/go.html-26cb2c50.js" as="script"><link rel="prefetch" href="/assets/lanqiaobei.html-09ed791f.js" as="script"><link rel="prefetch" href="/assets/mysql.html-f2824026.js" as="script"><link rel="prefetch" href="/assets/os.html-8d5ea793.js" as="script"><link rel="prefetch" href="/assets/python.html-07328db0.js" as="script"><link rel="prefetch" href="/assets/qianduan.html-5c9e3e70.js" as="script"><link rel="prefetch" href="/assets/index.html-5ee5c8ed.js" as="script"><link rel="prefetch" href="/assets/redis.html-eeaf2790.js" as="script"><link rel="prefetch" href="/assets/august.html-fad9d448.js" as="script"><link rel="prefetch" href="/assets/first.html-bbe17ff3.js" as="script"><link rel="prefetch" href="/assets/java-mianshi-zhinan.html-c5596811.js" as="script"><link rel="prefetch" href="/assets/jianli.html-fe93caae.js" as="script"><link rel="prefetch" href="/assets/july.html-a919c8d2.js" as="script"><link rel="prefetch" href="/assets/june.html-6e7eb152.js" as="script"><link rel="prefetch" href="/assets/map.html-1c8a1a21.js" as="script"><link rel="prefetch" href="/assets/may.html-afaf217f.js" as="script"><link rel="prefetch" href="/assets/mianshi.html-7d52ea6e.js" as="script"><link rel="prefetch" href="/assets/paicoding.html-efd0bcac.js" as="script"><link rel="prefetch" href="/assets/index.html-eb6db7aa.js" as="script"><link rel="prefetch" href="/assets/jibenjieshao.html-6e457be9.js" as="script"><link rel="prefetch" href="/assets/luoczbmsddyb.html-8156c2ac.js" as="script"><link rel="prefetch" href="/assets/miansmtgl.html-4f03ca9f.js" as="script"><link rel="prefetch" href="/assets/xzbztdncdlxgljsjq.html-633309d0.js" as="script"><link rel="prefetch" href="/assets/youdxzhhmjzlycfx.html-e218ab35.js" as="script"><link rel="prefetch" href="/assets/zijxjjdyfqzgl.html-c79c6532.js" as="script"><link rel="prefetch" href="/assets/javase.html-ff7fbf04.js" as="script"><link rel="prefetch" href="/assets/collection.html-5f1bbacb.js" as="script"><link rel="prefetch" href="/assets/fenbushi.html-e7acfc48.js" as="script"><link rel="prefetch" href="/assets/javase.html-5c23f91d.js" as="script"><link rel="prefetch" href="/assets/javathread.html-99c9cfb3.js" as="script"><link rel="prefetch" href="/assets/jvm.html-e55c2fc5.js" as="script"><link rel="prefetch" href="/assets/mybatis.html-6a29e269.js" as="script"><link rel="prefetch" href="/assets/mysql.html-0cba0980.js" as="script"><link rel="prefetch" href="/assets/network.html-a6339f49.js" as="script"><link rel="prefetch" href="/assets/nixi.html-06b8e71c.js" as="script"><link rel="prefetch" href="/assets/os.html-76b55d4f.js" as="script"><link rel="prefetch" href="/assets/redis.html-29852abd.js" as="script"><link rel="prefetch" href="/assets/rocketmq.html-7c1365dc.js" as="script"><link rel="prefetch" href="/assets/spring.html-b205f45e.js" as="script"><link rel="prefetch" href="/assets/weifuwu.html-5bf2b60b.js" as="script"><link rel="prefetch" href="/assets/jvm.html-e4c9f341.js" as="script"><link rel="prefetch" href="/assets/thread.html-6c709448.js" as="script"><link rel="prefetch" href="/assets/yitiaolong.html-013cddb4.js" as="script"><link rel="prefetch" href="/assets/404.html-662c4377.js" as="script"><link rel="prefetch" href="/assets/index.html-65f71d35.js" as="script"><link rel="prefetch" href="/assets/index.html-0196820e.js" as="script"><link rel="prefetch" href="/assets/index.html-355d3843.js" as="script"><link rel="prefetch" href="/assets/index.html-88857071.js" as="script"><link rel="prefetch" href="/assets/index.html-8d35750d.js" as="script"><link rel="prefetch" href="/assets/index.html-c9c5534a.js" as="script"><link rel="prefetch" href="/assets/index.html-b700c805.js" as="script"><link rel="prefetch" href="/assets/index.html-3fbef48c.js" as="script"><link rel="prefetch" href="/assets/index.html-5f1804ed.js" as="script"><link rel="prefetch" href="/assets/index.html-052bccee.js" as="script"><link rel="prefetch" href="/assets/index.html-0922476c.js" as="script"><link rel="prefetch" href="/assets/index.html-033e85d5.js" as="script"><link rel="prefetch" href="/assets/index.html-ba418312.js" as="script"><link rel="prefetch" href="/assets/index.html-8d848fa4.js" as="script"><link rel="prefetch" href="/assets/index.html-9aa193cc.js" as="script"><link rel="prefetch" href="/assets/index.html-f2860520.js" as="script"><link rel="prefetch" href="/assets/index.html-a22af14c.js" as="script"><link rel="prefetch" href="/assets/index.html-70f0899c.js" as="script"><link rel="prefetch" href="/assets/index.html-6ddc2bf4.js" as="script"><link rel="prefetch" href="/assets/index.html-b2d8871f.js" as="script"><link rel="prefetch" href="/assets/index.html-4f12724c.js" as="script"><link rel="prefetch" href="/assets/index.html-fdbaa207.js" as="script"><link rel="prefetch" href="/assets/index.html-2c243d7f.js" as="script"><link rel="prefetch" href="/assets/index.html-543a1d87.js" as="script"><link rel="prefetch" href="/assets/index.html-3d26b925.js" as="script"><link rel="prefetch" href="/assets/index.html-15a2013e.js" as="script"><link rel="prefetch" href="/assets/index.html-b12fdc3c.js" as="script"><link rel="prefetch" href="/assets/index.html-ef76fa15.js" as="script"><link rel="prefetch" href="/assets/index.html-16fda3de.js" as="script"><link rel="prefetch" href="/assets/index.html-189c140a.js" as="script"><link rel="prefetch" href="/assets/index.html-c3b365c8.js" as="script"><link rel="prefetch" href="/assets/index.html-006fab13.js" as="script"><link rel="prefetch" href="/assets/index.html-da27d44d.js" as="script"><link rel="prefetch" href="/assets/index.html-0fc2c9a7.js" as="script"><link rel="prefetch" href="/assets/index.html-ebb2e101.js" as="script"><link rel="prefetch" href="/assets/index.html-7195e729.js" as="script"><link rel="prefetch" href="/assets/index.html-bb50be3c.js" as="script"><link rel="prefetch" href="/assets/index.html-44eca8aa.js" as="script"><link rel="prefetch" href="/assets/index.html-4e58c96a.js" as="script"><link rel="prefetch" href="/assets/index.html-c7ffcf0f.js" as="script"><link rel="prefetch" href="/assets/mermaid.core-39b03a6a.js" as="script"><link rel="prefetch" href="/assets/markdown.esm-abe06b83.js" as="script"><link rel="prefetch" href="/assets/reveal.esm-ec5549c1.js" as="script"><link rel="prefetch" href="/assets/photoswipe.esm-4e1eea98.js" as="script"><link rel="prefetch" href="/assets/index-e32a7948.js" as="script"><link rel="prefetch" href="/assets/giscus-0b7adcf8.js" as="script"><link rel="prefetch" href="/assets/style-e9220a04.js" as="script"><link rel="prefetch" href="/assets/docsearch-1d421ddb.js" as="script"><link rel="prefetch" href="/assets/index-82585c84.js" as="script">
</head>
<body>
<div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content" class="vp-skip-link sr-only">跳至主要內容</a><!--]--><div class="theme-container has-toc"><!--[--><header id="navbar" class="vp-navbar"><div class="vp-navbar-start"><button type="button" class="vp-toggle-sidebar-button" title="Toggle Sidebar"><span class="icon"></span></button><!--[--><!----><!--]--><!--[--><a class="vp-link vp-brand" href="/"><img class="vp-nav-logo" src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/logo-02.png" alt="二哥的Java进阶之路"><!----><span class="vp-site-name hide-in-pad">二哥的Java进阶之路</span></a><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-center"><!--[--><!----><!--]--><!--[--><nav class="vp-nav-links"><div class="nav-item hide-in-mobile"><a class="vp-link nav-link" href="/blog.html"><span class="font-icon icon iconfont icon-gaishu" style=""></span>博客<!----></a></div><div class="nav-item hide-in-mobile"><a class="vp-link nav-link" href="/home.html"><span class="font-icon icon iconfont icon-lujing" style=""></span>进阶之路<!----></a></div><div class="nav-item hide-in-mobile"><a class="vp-link nav-link" href="/zhishixingqiu/"><span class="font-icon icon iconfont icon-Artboard" style=""></span>知识星球<!----></a></div><div class="nav-item hide-in-mobile"><a class="vp-link nav-link" href="/xuexiluxian/"><span class="font-icon icon iconfont icon-luxian" style=""></span>学习路线<!----></a></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="珍藏资源"><span class="title"><span class="font-icon icon iconfont icon-youzhi" style=""></span>珍藏资源</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a class="vp-link nav-link" href="/pdf/"><span class="font-icon icon iconfont icon-java" style=""></span>PDF下载<!----></a></li><li class="dropdown-item"><a class="vp-link nav-link" href="/sidebar/sanfene/nixi.html"><span class="font-icon icon iconfont icon-zhunbei" style=""></span>面渣逆袭<!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><a href="https://space.bilibili.com/513340480" rel="noopener noreferrer" target="_blank" aria-label="B站视频" class="nav-link"><span class="font-icon icon iconfont icon-bzhan" style=""></span>B站视频<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div></nav><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-end"><!--[--><!----><!--]--><!--[--><!----><div class="nav-item vp-repo"><a class="vp-repo-link" href="https://github.com/itwanger/toBeBetterJavaer" target="_blank" rel="noopener noreferrer" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="icon github-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="github icon" style="width:1.25rem;height:1.25rem;vertical-align:middle;"><path d="M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"></path></svg></a></div><div class="nav-item hide-in-mobile"><button type="button" class="outlook-button" tabindex="-1" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="icon outlook-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="outlook icon"><path d="M224 800c0 9.6 3.2 44.8 6.4 54.4 6.4 48-48 76.8-48 76.8s80 41.6 147.2 0 134.4-134.4 38.4-195.2c-22.4-12.8-41.6-19.2-57.6-19.2C259.2 716.8 227.2 761.6 224 800zM560 675.2l-32 51.2c-51.2 51.2-83.2 32-83.2 32 25.6 67.2 0 112-12.8 128 25.6 6.4 51.2 9.6 80 9.6 54.4 0 102.4-9.6 150.4-32l0 0c3.2 0 3.2-3.2 3.2-3.2 22.4-16 12.8-35.2 6.4-44.8-9.6-12.8-12.8-25.6-12.8-41.6 0-54.4 60.8-99.2 137.6-99.2 6.4 0 12.8 0 22.4 0 12.8 0 38.4 9.6 48-25.6 0-3.2 0-3.2 3.2-6.4 0-3.2 3.2-6.4 3.2-6.4 6.4-16 6.4-16 6.4-19.2 9.6-35.2 16-73.6 16-115.2 0-105.6-41.6-198.4-108.8-268.8C704 396.8 560 675.2 560 675.2zM224 419.2c0-28.8 22.4-51.2 51.2-51.2 28.8 0 51.2 22.4 51.2 51.2 0 28.8-22.4 51.2-51.2 51.2C246.4 470.4 224 448 224 419.2zM320 284.8c0-22.4 19.2-41.6 41.6-41.6 22.4 0 41.6 19.2 41.6 41.6 0 22.4-19.2 41.6-41.6 41.6C339.2 326.4 320 307.2 320 284.8zM457.6 208c0-12.8 12.8-25.6 25.6-25.6 12.8 0 25.6 12.8 25.6 25.6 0 12.8-12.8 25.6-25.6 25.6C470.4 233.6 457.6 220.8 457.6 208zM128 505.6C128 592 153.6 672 201.6 736c28.8-60.8 112-60.8 124.8-60.8-16-51.2 16-99.2 16-99.2l316.8-422.4c-48-19.2-99.2-32-150.4-32C297.6 118.4 128 291.2 128 505.6zM764.8 86.4c-22.4 19.2-390.4 518.4-390.4 518.4-22.4 28.8-12.8 76.8 22.4 99.2l9.6 6.4c35.2 22.4 80 12.8 99.2-25.6 0 0 6.4-12.8 9.6-19.2 54.4-105.6 275.2-524.8 288-553.6 6.4-19.2-3.2-32-19.2-32C777.6 76.8 771.2 80 764.8 86.4z"></path></svg><div class="outlook-dropdown"><!----></div></button></div><!--[--><div id="docsearch-container" style="display:none;"></div><div><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索文档"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索文档</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"><svg width="15" height="15" class="DocSearch-Control-Key-Icon"><path d="M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953" stroke-width="1.2" stroke="currentColor" fill="none" stroke-linecap="square"></path></svg></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--><!--]--><!--[--><!----><!--]--><button type="button" class="vp-toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span><span class="vp-top"></span><span class="vp-middle"></span><span class="vp-bottom"></span></span></button></div></header><!----><!--]--><!----><div class="toggle-sidebar-wrapper"><span class="arrow start"></span></div><aside id="sidebar" class="vp-sidebar"><!--[--><!----><!--]--><ul class="vp-sidebar-links"><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/home.html"><!---->一、前言<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable active" type="button"><!----><span class="vp-sidebar-title">二、Java基础</span><span class="vp-arrow down"></span></button><ul class="vp-sidebar-links"><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.1 Java概述及环境配置</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.2 Java语法基础</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.3 数组&字符串</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable active" type="button"><!----><span class="vp-sidebar-title">2.4 面向对象编程</span><span class="vp-arrow down"></span></button><ul class="vp-sidebar-links"><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/object-class.html"><!---->Java中的类和对象<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/package.html"><!---->Java中的包<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/var.html"><!---->Java中的变量<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/method.html"><!---->Java中的方法<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/basic-extra-meal/varables.html"><!---->Java可变参数<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/native-method.html"><!---->Java native方法<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/construct.html"><!---->Java构造方法<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/access-control.html"><!---->Java访问权限修饰符<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/code-init.html"><!---->Java代码初始化块<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/abstract.html"><!---->Java抽象类<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/interface.html"><!---->Java接口<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/inner-class.html"><!---->Java内部类<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/encapsulation-inheritance-polymorphism.html"><!---->Java封装继承多态<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/this-super.html"><!---->Java this和super关键字<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/static.html"><!---->Java static关键字<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/oo/final.html"><!---->Java final关键字<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/basic-extra-meal/instanceof.html"><!---->Java instanceof关键字<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/basic-extra-meal/immutable.html"><!---->Java不可变对象<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/basic-extra-meal/override-overload.html"><!---->Java方法重写和方法重载<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link vp-sidebar-link vp-sidebar-page" href="/basic-extra-meal/annotation.html"><!---->Java注解<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a class="vp-link nav-link active vp-sidebar-link vp-sidebar-page active" href="/basic-extra-meal/enum.html"><!---->Java枚举(enum)<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.5 集合框架(容器)</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.6 Java IO</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.7 异常处理</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.8 常用工具类</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><a class="vp-link nav-link vp-sidebar-title" href="/java8/"><!---->2.9 Java新特性<!----></a><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.10 网络编程</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.11 NIO</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.12 Java重要知识点</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.13 并发编程</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">2.14 JVM</span><span class="vp-arrow end"></span></button><!----></section></li></ul></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">三、Java进阶</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">四、MySQL</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">五、Redis</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">六、计算机基础</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">七、求职面试</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">八、学习建议</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">九、知识库搭建</span><span class="vp-arrow end"></span></button><!----></section></li><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable" type="button"><!----><span class="vp-sidebar-title">十、联系作者</span><span class="vp-arrow end"></span></button><!----></section></li></ul><!--[--><!----><!--]--></aside><!--[--><main id="main-content" class="vp-page"><!--[--><!----><!----><nav class="vp-breadcrumb disable"></nav><div class="vp-page-title"><h1><!---->Java枚举:小小enum,优雅而干净</h1><div class="page-info"><span class="page-author-info" aria-label="作者🖊" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon author-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="author icon"><path d="M649.6 633.6c86.4-48 147.2-144 147.2-249.6 0-160-128-288-288-288s-288 128-288 288c0 108.8 57.6 201.6 147.2 249.6-121.6 48-214.4 153.6-240 288-3.2 9.6 0 19.2 6.4 25.6 3.2 9.6 12.8 12.8 22.4 12.8h704c9.6 0 19.2-3.2 25.6-12.8 6.4-6.4 9.6-16 6.4-25.6-25.6-134.4-121.6-240-243.2-288z"></path></svg><span><a class="page-author-item" href="/about-the-author/" target="_blank" rel="noopener noreferrer">沉默王二</a></span><span property="author" content="沉默王二"></span></span><!----><span class="page-date-info" aria-label="写作日期📅" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="calendar icon"><path d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z"></path></svg><span><!----></span><meta property="datePublished" content="2021-10-22T07:22:10.000Z"></span><span class="page-category-info" aria-label="分类🌈" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon category-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="category icon"><path d="M148.41 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H148.41c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.311-40.31zM147.556 553.478H429.73c22.263 0 40.311 18.048 40.311 40.31v282.176c0 22.263-18.048 40.312-40.31 40.312H147.555c-22.263 0-40.311-18.049-40.311-40.312V593.79c0-22.263 18.048-40.311 40.31-40.311zM593.927 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H593.927c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.31-40.31zM730.22 920.502H623.926c-40.925 0-74.22-33.388-74.22-74.425V623.992c0-41.038 33.387-74.424 74.425-74.424h222.085c41.038 0 74.424 33.226 74.424 74.067v114.233c0 10.244-8.304 18.548-18.547 18.548s-18.548-8.304-18.548-18.548V623.635c0-20.388-16.746-36.974-37.33-36.974H624.13c-20.585 0-37.331 16.747-37.331 37.33v222.086c0 20.585 16.654 37.331 37.126 37.331H730.22c10.243 0 18.547 8.304 18.547 18.547 0 10.244-8.304 18.547-18.547 18.547z"></path></svg><!--[--><span class="page-category-item category0" role>Java核心</span><!--]--><meta property="articleSection" content="Java核心"></span><span class="page-tag-info" aria-label="标签🏷" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon tag-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="tag icon"><path d="M939.902 458.563L910.17 144.567c-1.507-16.272-14.465-29.13-30.737-30.737L565.438 84.098h-.402c-3.215 0-5.726 1.005-7.634 2.913l-470.39 470.39a10.004 10.004 0 000 14.164l365.423 365.424c1.909 1.908 4.42 2.913 7.132 2.913s5.223-1.005 7.132-2.913l470.39-470.39c2.01-2.11 3.014-5.023 2.813-8.036zm-240.067-72.121c-35.458 0-64.286-28.828-64.286-64.286s28.828-64.285 64.286-64.285 64.286 28.828 64.286 64.285-28.829 64.286-64.286 64.286z"></path></svg><!--[--><span class="page-tag-item tag3" role>Java重要知识点</span><!--]--><meta property="keywords" content="Java重要知识点"></span><span class="page-word-info" aria-label="字数🔠" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon word-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="word icon"><path d="M518.217 432.64V73.143A73.143 73.143 0 01603.43 1.097a512 512 0 01419.474 419.474 73.143 73.143 0 01-72.046 85.212H591.36a73.143 73.143 0 01-73.143-73.143z"></path><path d="M493.714 566.857h340.297a73.143 73.143 0 0173.143 85.577A457.143 457.143 0 11371.566 117.76a73.143 73.143 0 0185.577 73.143v339.383a36.571 36.571 0 0036.571 36.571z"></path></svg><span>约 1896 字</span><meta property="wordCount" content="1896"></span><span class="page-reading-time-info" aria-label="阅读时间⌛" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon timer-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="timer icon"><path d="M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"></path></svg><span>大约 6 分钟</span><meta property="timeRequired" content="PT6M"></span></div><hr></div><!----><!----><div class="theme-hope-content"><h1 id="_5-21-java枚举-enum" tabindex="-1"><a class="header-anchor" href="#_5-21-java枚举-enum" aria-hidden="true">#</a> 5.21 Java枚举(enum)</h1><p>“今天我们来学习枚举吧,三妹!”我说,“同学让你去她家玩了两天,感觉怎么样呀?”</p><p>“心情放松了不少。”三妹说,“可以开始学 Java 了,二哥。”</p><p>“OK。”</p><p>“枚举(enum),是 Java 1.5 时引入的关键字,它表示一种特殊类型的类,继承自 java.lang.Enum。”</p><p>“我们来新建一个枚举 PlayerType。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">enum</span> <span class="token class-name">PlayerType</span> <span class="token punctuation">{</span>
<span class="token constant">TENNIS</span><span class="token punctuation">,</span>
<span class="token constant">FOOTBALL</span><span class="token punctuation">,</span>
<span class="token constant">BASKETBALL</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“二哥,我没看到有继承关系呀!”</p><p>“别着急,看一下反编译后的字节码,你就明白了。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">final</span> <span class="token keyword">class</span> <span class="token class-name">PlayerType</span> <span class="token keyword">extends</span> <span class="token class-name">Enum</span>
<span class="token punctuation">{</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">PlayerType</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token function">values</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span>$<span class="token constant">VALUES</span><span class="token punctuation">.</span><span class="token function">clone</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">PlayerType</span> <span class="token function">valueOf</span><span class="token punctuation">(</span><span class="token class-name">String</span> name<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">)</span><span class="token class-name">Enum</span><span class="token punctuation">.</span><span class="token function">valueOf</span><span class="token punctuation">(</span>com<span class="token operator">/</span>cmower<span class="token operator">/</span>baeldung<span class="token operator">/</span>enum1<span class="token operator">/</span><span class="token class-name">PlayerType</span><span class="token punctuation">,</span> name<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">private</span> <span class="token class-name">PlayerType</span><span class="token punctuation">(</span><span class="token class-name">String</span> s<span class="token punctuation">,</span> <span class="token keyword">int</span> i<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
<span class="token keyword">super</span><span class="token punctuation">(</span>s<span class="token punctuation">,</span> i<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">PlayerType</span> <span class="token constant">TENNIS</span><span class="token punctuation">;</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">PlayerType</span> <span class="token constant">FOOTBALL</span><span class="token punctuation">;</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">PlayerType</span> <span class="token constant">BASKETBALL</span><span class="token punctuation">;</span>
<span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">PlayerType</span> $<span class="token constant">VALUES</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token keyword">static</span>
<span class="token punctuation">{</span>
<span class="token constant">TENNIS</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">PlayerType</span><span class="token punctuation">(</span><span class="token string">"TENNIS"</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token constant">FOOTBALL</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">PlayerType</span><span class="token punctuation">(</span><span class="token string">"FOOTBALL"</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token constant">BASKETBALL</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">PlayerType</span><span class="token punctuation">(</span><span class="token string">"BASKETBALL"</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
$<span class="token constant">VALUES</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">PlayerType</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token punctuation">{</span>
<span class="token constant">TENNIS</span><span class="token punctuation">,</span> <span class="token constant">FOOTBALL</span><span class="token punctuation">,</span> <span class="token constant">BASKETBALL</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“看到没?Java 编译器帮我们做了很多隐式的工作,不然手写一个枚举就没那么省心省事了。”</p><ul><li>要继承 Enum 类;</li><li>要写构造方法;</li><li>要声明静态变量和数组;</li><li>要用 static 块来初始化静态变量和数组;</li><li>要提供静态方法,比如说 <code>values()</code> 和 <code>valueOf(String name)</code>。</li></ul><p>“确实,作为开发者,我们的代码量减少了,枚举看起来简洁明了。”三妹说。</p><p>“既然枚举是一种特殊的类,那它其实是可以定义在一个类的内部的,这样它的作用域就可以限定于这个外部类中使用。”我说。</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Player</span> <span class="token punctuation">{</span>
<span class="token keyword">private</span> <span class="token class-name">PlayerType</span> type<span class="token punctuation">;</span>
<span class="token keyword">public</span> <span class="token keyword">enum</span> <span class="token class-name">PlayerType</span> <span class="token punctuation">{</span>
<span class="token constant">TENNIS</span><span class="token punctuation">,</span>
<span class="token constant">FOOTBALL</span><span class="token punctuation">,</span>
<span class="token constant">BASKETBALL</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">isBasketballPlayer</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token function">getType</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token class-name">PlayerType</span> <span class="token function">getType</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> type<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">setType</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span> type<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">this</span><span class="token punctuation">.</span>type <span class="token operator">=</span> type<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>PlayerType 就相当于 Player 的内部类。</p><p>由于枚举是 final 的,所以可以确保在 Java 虚拟机中仅有一个常量对象,基于这个原因,我们可以使用“==”运算符来比较两个枚举是否相等,参照 <code>isBasketballPlayer()</code> 方法。</p><p>“那为什么不使用 <code>equals()</code> 方法判断呢?”三妹问。</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">if</span><span class="token punctuation">(</span>player<span class="token punctuation">.</span><span class="token function">getType</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span><span class="token class-name">Player<span class="token punctuation">.</span>PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>“我来给你解释下。”</p><p>“==”运算符比较的时候,如果两个对象都为 null,并不会发生 <code>NullPointerException</code>,而 <code>equals()</code> 方法则会。</p><p>另外, “==”运算符会在编译时进行检查,如果两侧的类型不匹配,会提示错误,而 <code>equals()</code> 方法则不会。</p><figure><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/enum/enum-01.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>“枚举还可用于 switch 语句,和基本数据类型的用法一致。”我说。</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">switch</span> <span class="token punctuation">(</span>playerType<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">case</span> <span class="token constant">TENNIS</span><span class="token operator">:</span>
<span class="token keyword">return</span> <span class="token string">"网球运动员费德勒"</span><span class="token punctuation">;</span>
<span class="token keyword">case</span> <span class="token constant">FOOTBALL</span><span class="token operator">:</span>
<span class="token keyword">return</span> <span class="token string">"足球运动员C罗"</span><span class="token punctuation">;</span>
<span class="token keyword">case</span> <span class="token constant">BASKETBALL</span><span class="token operator">:</span>
<span class="token keyword">return</span> <span class="token string">"篮球运动员詹姆斯"</span><span class="token punctuation">;</span>
<span class="token keyword">case</span> <span class="token constant">UNKNOWN</span><span class="token operator">:</span>
<span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">IllegalArgumentException</span><span class="token punctuation">(</span><span class="token string">"未知"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">default</span><span class="token operator">:</span>
<span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">IllegalArgumentException</span><span class="token punctuation">(</span>
<span class="token string">"运动员类型: "</span> <span class="token operator">+</span> playerType<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“如果枚举中需要包含更多信息的话,可以为其添加一些字段,比如下面示例中的 name,此时需要为枚举添加一个带参的构造方法,这样就可以在定义枚举时添加对应的名称了。”我继续说。</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">enum</span> <span class="token class-name">PlayerType</span> <span class="token punctuation">{</span>
<span class="token function">TENNIS</span><span class="token punctuation">(</span><span class="token string">"网球"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token function">FOOTBALL</span><span class="token punctuation">(</span><span class="token string">"足球"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token function">BASKETBALL</span><span class="token punctuation">(</span><span class="token string">"篮球"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">private</span> <span class="token class-name">String</span> name<span class="token punctuation">;</span>
<span class="token class-name">PlayerType</span><span class="token punctuation">(</span><span class="token class-name">String</span> name<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">this</span><span class="token punctuation">.</span>name <span class="token operator">=</span> name<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“get 了吧,三妹?”</p><p>“嗯,比较好理解。”</p><p>“那接下来,我就来说点不一样的。”</p><p>“来吧,我准备好了。”</p><p>“EnumSet 是一个专门针对枚举类型的 <a href="https://javabetter.cn/collection/gailan.html" target="_blank" rel="noopener noreferrer">Set 接口<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>(后面会讲)的实现类,它是处理枚举类型数据的一把利器,非常高效。”我说,“从名字上就可以看得出,EnumSet 不仅和 Set 有关系,和枚举也有关系。”</p><p>“因为 EnumSet 是一个抽象类,所以创建 EnumSet 时不能使用 new 关键字。不过,EnumSet 提供了很多有用的静态工厂方法。”</p><figure><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/enum/enum-02.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>“来看下面这个例子,我们使用 <code>noneOf()</code> 静态工厂方法创建了一个空的 PlayerType 类型的 EnumSet;使用 <code>allOf()</code> 静态工厂方法创建了一个包含所有 PlayerType 类型的 EnumSet。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">EnumSetTest</span> <span class="token punctuation">{</span>
<span class="token keyword">public</span> <span class="token keyword">enum</span> <span class="token class-name">PlayerType</span> <span class="token punctuation">{</span>
<span class="token constant">TENNIS</span><span class="token punctuation">,</span>
<span class="token constant">FOOTBALL</span><span class="token punctuation">,</span>
<span class="token constant">BASKETBALL</span>
<span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token class-name">EnumSet</span><span class="token generics"><span class="token punctuation"><</span><span class="token class-name">PlayerType</span><span class="token punctuation">></span></span> enumSetNone <span class="token operator">=</span> <span class="token class-name">EnumSet</span><span class="token punctuation">.</span><span class="token function">noneOf</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumSetNone<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">EnumSet</span><span class="token generics"><span class="token punctuation"><</span><span class="token class-name">PlayerType</span><span class="token punctuation">></span></span> enumSetAll <span class="token operator">=</span> <span class="token class-name">EnumSet</span><span class="token punctuation">.</span><span class="token function">allOf</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumSetAll<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“来看一下输出结果。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span><span class="token constant">TENNIS</span><span class="token punctuation">,</span> <span class="token constant">FOOTBALL</span><span class="token punctuation">,</span> <span class="token constant">BASKETBALL</span><span class="token punctuation">]</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>有了 EnumSet 后,就可以使用 Set 的一些方法了,见下图。</p><figure><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/enum/enum-03.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>“除了 EnumSet,还有 EnumMap,是一个专门针对枚举类型的 Map 接口的实现类,它可以将枚举常量作为键来使用。EnumMap 的效率比 HashMap 还要高,可以直接通过数组下标(枚举的 ordinal 值)访问到元素。”</p><p>“和 EnumSet 不同,EnumMap 不是一个抽象类,所以创建 EnumMap 时可以使用 new 关键字。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token class-name">EnumMap</span><span class="token generics"><span class="token punctuation"><</span><span class="token class-name">PlayerType</span><span class="token punctuation">,</span> <span class="token class-name">String</span><span class="token punctuation">></span></span> enumMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">EnumMap</span><span class="token generics"><span class="token punctuation"><</span><span class="token punctuation">></span></span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>有了 EnumMap 对象后就可以使用 Map 的一些方法了,见下图。</p><figure><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/enum/enum-04.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>和 <a href="https://javabetter.cn/collection/hashmap.html" target="_blank" rel="noopener noreferrer">HashMap<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>(后面会讲)的使用方法大致相同,来看下面的例子。</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token class-name">EnumMap</span><span class="token generics"><span class="token punctuation"><</span><span class="token class-name">PlayerType</span><span class="token punctuation">,</span> <span class="token class-name">String</span><span class="token punctuation">></span></span> enumMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">EnumMap</span><span class="token generics"><span class="token punctuation"><</span><span class="token punctuation">></span></span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
enumMap<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">,</span><span class="token string">"篮球运动员"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
enumMap<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">FOOTBALL</span><span class="token punctuation">,</span><span class="token string">"足球运动员"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
enumMap<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">TENNIS</span><span class="token punctuation">,</span><span class="token string">"网球运动员"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumMap<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumMap<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumMap<span class="token punctuation">.</span><span class="token function">containsKey</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>enumMap<span class="token punctuation">.</span><span class="token function">remove</span><span class="token punctuation">(</span><span class="token class-name">PlayerType</span><span class="token punctuation">.</span><span class="token constant">BASKETBALL</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“来看一下输出结果。”</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>{TENNIS=网球运动员, FOOTBALL=足球运动员, BASKETBALL=篮球运动员}
篮球运动员
true
篮球运动员
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“除了以上这些,《Effective Java》这本书里还提到了一点,如果要实现单例的话,最好使用枚举的方式。”我说。</p><p>“等等二哥,单例是什么?”三妹没等我往下说,就连忙问道。</p><p>“单例(Singleton)用来保证一个类仅有一个对象,并提供一个访问它的全局访问点,在一个进程中。因为这个类只有一个对象,所以就不能再使用 <code>new</code> 关键字来创建新的对象了。”</p><p>“Java 标准库有一些类就是单例,比如说 Runtime 这个类。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token class-name">Runtime</span> runtime <span class="token operator">=</span> <span class="token class-name">Runtime</span><span class="token punctuation">.</span><span class="token function">getRuntime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>“Runtime 类可以用来获取 Java 程序运行时的环境。”</p><p>“关于单例,懂了些吧?”我问三妹。</p><p>“噢噢噢噢。”三妹点了点头。</p><p>“通常情况下,实现单例并非易事,来看下面这种写法。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Singleton</span> <span class="token punctuation">{</span>
<span class="token keyword">private</span> <span class="token keyword">volatile</span> <span class="token keyword">static</span> <span class="token class-name">Singleton</span> singleton<span class="token punctuation">;</span>
<span class="token keyword">private</span> <span class="token class-name">Singleton</span> <span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token punctuation">}</span>
<span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">Singleton</span> <span class="token function">getSingleton</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>singleton <span class="token operator">==</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">synchronized</span> <span class="token punctuation">(</span><span class="token class-name">Singleton</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>singleton <span class="token operator">==</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
singleton <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Singleton</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token keyword">return</span> singleton<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“要用到 <a href="https://javabetter.cn/thread/volatile.html" target="_blank" rel="noopener noreferrer">volatile<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>、<a href="https://javabetter.cn/thread/synchronized-1.html" target="_blank" rel="noopener noreferrer">synchronized<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 关键字等等,但枚举的出现,让代码量减少到极致。”</p><div class="language-java line-numbers-mode" data-ext="java"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">enum</span> <span class="token class-name">EasySingleton</span><span class="token punctuation">{</span>
<span class="token constant">INSTANCE</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>“就这?”三妹睁大了眼睛。</p><p>“对啊,枚举默认实现了 <a href="https://javabetter.cn/io/Serializbale.html" target="_blank" rel="noopener noreferrer">Serializable 接口<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>,因此 Java 虚拟机可以保证该类为单例,这与传统的实现方式不大相同。传统方式中,我们必须确保单例在反序列化期间不能创建任何新实例。”我说。</p><p>“好了,关于枚举就讲这么多吧,三妹,你把这些代码都手敲一遍吧!”</p><p>“好勒,这就安排。二哥,你去休息吧。”</p><p>“嗯嗯。”讲了这么多,必须跑去抽烟机那里安排一根华子了。</p><hr><p>GitHub 上标星 10000+ 的开源知识库《<a href="https://github.com/itwanger/toBeBetterJavaer" target="_blank" rel="noopener noreferrer">二哥的 Java 进阶之路<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>》第一版 PDF 终于来了!包括Java基础语法、数组&字符串、OOP、集合框架、Java IO、异常处理、Java 新特性、网络编程、NIO、并发编程、JVM等等,共计 32 万余字,500+张手绘图,可以说是通俗易懂、风趣幽默……详情戳:<a href="https://javabetter.cn/overview/" target="_blank" rel="noopener noreferrer">太赞了,GitHub 上标星 10000+ 的 Java 教程<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><p>微信搜 <strong>沉默王二</strong> 或扫描下方二维码关注二哥的原创公众号沉默王二,回复 <strong>222</strong> 即可免费领取。</p><figure><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/gongzhonghao.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure></div><!----><footer class="page-meta"><div class="meta-item edit-link"><a href="https://github.com/itwanger/toBeBetterJavaer/edit/master/docs/basic-extra-meal/enum.md" rel="noopener noreferrer" target="_blank" aria-label="编辑此页" class="nav-link label"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon edit-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="edit icon"><path d="M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"></path><path d="M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"></path></svg><!--]-->编辑此页<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="meta-item git-info"><div class="update-time"><span class="label">上次编辑于: </span><!----></div><div class="contributors"><span class="label">贡献者: </span><!--[--><!--[--><span class="contributor" title="email: www.qing_gee@163.com">itwanger</span>,<!--]--><!--[--><span class="contributor" title="email: www.qing_gee@163.com">沉默王二</span><!--]--><!--]--></div></div></footer><nav class="vp-page-nav"><a class="vp-link nav-link prev" href="/basic-extra-meal/annotation.html"><div class="hint"><span class="arrow start"></span>上一页</div><div class="link"><!---->Java注解</div></a><!----></nav><div id="comment" class="giscus-wrapper input-top" style="display:block;"><div class="loading-icon-wrapper" style="display:flex;align-items:center;justify-content:center;height:96px"><svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" preserveAspectRatio="xMidYMid" viewBox="25 25 50 50"><animateTransform attributeName="transform" type="rotate" dur="2s" keyTimes="0;1" repeatCount="indefinite" values="0;360"></animateTransform><circle cx="50" cy="50" r="20" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"><animate attributeName="stroke-dasharray" dur="1.5s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1,200;90,200;1,200"></animate><animate attributeName="stroke-dashoffset" dur="1.5s" keyTimes="0;0.5;1" repeatCount="indefinite" values="0;-35px;-125px"></animate></circle></svg></div></div><!----><!--]--></main><!--]--><footer class="vp-footer-wrapper"><div class="vp-footer"><a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备2021038026号-4</a><img src="https://cdn.tobebetterjavaer.com/tobebetterjavaer/images/beian.png" height="15px" width="15px" /><a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41030502000411"><span>豫公网安备 41030502000411号</span></a></div><div class="vp-copyright">Copyright © 2024 沉默王二</div></footer></div><!--]--><!----><!----><!--]--></div>
<script type="module" src="/assets/app-dea8ffe7.js" defer></script>
</body>
</html>