auto commit
This commit is contained in:
parent
e630613380
commit
222f93fafc
|
@ -1322,6 +1322,25 @@ public static void main(String[] args) {
|
|||
|
||||
应该注意的是,返回值不同,其它都相同不算是重载。
|
||||
|
||||
```
|
||||
class OverloadingExample {
|
||||
public void show(int x) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
public void show(int x, String y) {
|
||||
System.out.println(x + " " + y);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
public static void main(String[] args) {
|
||||
OverloadingExample example = new OverloadingExample();
|
||||
example.show(1);
|
||||
example.show(1, "2");
|
||||
}
|
||||
```
|
||||
|
||||
# 七、反射
|
||||
|
||||
|
|
|
@ -1322,6 +1322,25 @@ public static void main(String[] args) {
|
|||
|
||||
应该注意的是,返回值不同,其它都相同不算是重载。
|
||||
|
||||
```
|
||||
class OverloadingExample {
|
||||
public void show(int x) {
|
||||
System.out.println(x);
|
||||
}
|
||||
|
||||
public void show(int x, String y) {
|
||||
System.out.println(x + " " + y);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
public static void main(String[] args) {
|
||||
OverloadingExample example = new OverloadingExample();
|
||||
example.show(1);
|
||||
example.show(1, "2");
|
||||
}
|
||||
```
|
||||
|
||||
# 七、反射
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
- [9. 用两个栈实现队列](9.%20用两个栈实现队列.md)
|
||||
- [30. 包含 min 函数的栈](30.%20包含%20min%20函数的栈.md)
|
||||
- [31. 栈的压入、弹出序列](31.%20栈的压入、弹出序列.md)
|
||||
|
||||
- [40. 最小的 K 个数](40.%20最小的%20K%20个数.md)
|
||||
- [41.1 数据流中的中位数](41.1%20数据流中的中位数.md)
|
||||
- [41.2 字符流中第一个不重复的字符](41.2%20字符流中第一个不重复的字符.md)
|
||||
|
|
Loading…
Reference in New Issue
Block a user