File tree Expand file tree Collapse file tree 2 files changed +0
-50
lines changed Expand file tree Collapse file tree 2 files changed +0
-50
lines changed Original file line number Diff line number Diff line change @@ -1323,55 +1323,6 @@ public static void main(String[] args) {
1323
1323
应该注意的是,返回值不同,其它都相同不算是重载。
1324
1324
1325
1325
1326
- - 方法重载 例子
1327
- ``` java
1328
- class DisplayOverloading
1329
- {
1330
- public void disp (char c )
1331
- {
1332
- System . out. println(c);
1333
- }
1334
- public void disp (char c , int num )
1335
- {
1336
- System . out. println(c + " " + num);
1337
- }
1338
- }
1339
- class Sample
1340
- {
1341
- public static void main (String args [])
1342
- {
1343
- DisplayOverloading obj = new DisplayOverloading ();
1344
- obj. disp(' a' );
1345
- obj. disp(' a' ,10 );
1346
- }
1347
- }
1348
- ```
1349
- [ Method Overloading] ( https://beginnersbook.com/2013/05/method-overloading/ )
1350
-
1351
- - 构造重载 例子
1352
- ``` java
1353
- class DisplayOverloading
1354
- {
1355
- DisplayOverloading (char c )
1356
- {
1357
- System . out. println(c);
1358
- }
1359
- DisplayOverloading (char c , int num )
1360
- {
1361
- System . out. println(c + " " + num);
1362
- }
1363
- }
1364
- class Sample
1365
- {
1366
- public static void main (String args [])
1367
- {
1368
- DisplayOverloading obj = new DisplayOverloading (' a' );
1369
- DisplayOverloading obj2 = new DisplayOverloading (' a' ,10 );
1370
- }
1371
- }
1372
- ```
1373
- [ Constructor Overloading] ( https://beginnersbook.com/2013/05/constructor-overloading/ )
1374
-
1375
1326
# 七、反射
1376
1327
1377
1328
每个类都有一个 ** Class** 对象,包含了与类有关的信息。当编译一个新类时,会产生一个同名的 .class 文件,该文件内容保存着 Class 对象。
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
-
53
52
- [ 40. 最小的 K 个数] ( 40.%20最小的%20K%20个数.md )
54
53
- [ 41.1 数据流中的中位数] ( 41.1%20数据流中的中位数.md )
55
54
- [ 41.2 字符流中第一个不重复的字符] ( 41.2%20字符流中第一个不重复的字符.md )
You can’t perform that action at this time.
0 commit comments