public
class
heavy_load {
/**
*
@param
args
*/
public
static
void
main(String[] args) {
//
TODO
Auto-generated method stub
heavy_load to =
new
heavy_load();
to.thism();
to.thism(1);
to.thism(1,2);
}
void
thism(){
//定以方法
System.
out
.println(
"dige"
);
}
void
thism(
int
a){
//第一次重载
System.
out
.println(
"a: "
+a);
}
void
thism(
int
a,
int
y){
//第二次重载
System.
out
.println(a+
" "
+y);
}
}
结果