File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -1322,6 +1322,25 @@ public static void main(String[] args) {
1322
1322
1323
1323
应该注意的是,返回值不同,其它都相同不算是重载。
1324
1324
1325
+ ```
1326
+ class OverloadingExample {
1327
+ public void show(int x) {
1328
+ System.out.println(x);
1329
+ }
1330
+
1331
+ public void show(int x, String y) {
1332
+ System.out.println(x + " " + y);
1333
+ }
1334
+ }
1335
+ ```
1336
+
1337
+ ```
1338
+ public static void main(String[] args) {
1339
+ OverloadingExample example = new OverloadingExample();
1340
+ example.show(1);
1341
+ example.show(1, "2");
1342
+ }
1343
+ ```
1325
1344
1326
1345
# 七、反射
1327
1346
Original file line number Diff line number Diff line change @@ -1322,6 +1322,25 @@ public static void main(String[] args) {
1322
1322
1323
1323
应该注意的是,返回值不同,其它都相同不算是重载。
1324
1324
1325
+ ```
1326
+ class OverloadingExample {
1327
+ public void show(int x) {
1328
+ System.out.println(x);
1329
+ }
1330
+
1331
+ public void show(int x, String y) {
1332
+ System.out.println(x + " " + y);
1333
+ }
1334
+ }
1335
+ ```
1336
+
1337
+ ```
1338
+ public static void main(String[] args) {
1339
+ OverloadingExample example = new OverloadingExample();
1340
+ example.show(1);
1341
+ example.show(1, "2");
1342
+ }
1343
+ ```
1325
1344
1326
1345
# 七、反射
1327
1346
Original file line number Diff line number Diff line change 49
49
- [ 9. 用两个栈实现队列] ( 9.%20用两个栈实现队列.md )
50
50
- [ 30. 包含 min 函数的栈] ( 30.%20包含%20min%20函数的栈.md )
51
51
- [ 31. 栈的压入、弹出序列] ( 31.%20栈的压入、弹出序列.md )
52
+
52
53
- [ 40. 最小的 K 个数] ( 40.%20最小的%20K%20个数.md )
53
54
- [ 41.1 数据流中的中位数] ( 41.1%20数据流中的中位数.md )
54
55
- [ 41.2 字符流中第一个不重复的字符] ( 41.2%20字符流中第一个不重复的字符.md )
You can’t perform that action at this time.
0 commit comments