Overloading : 重载
Overloading 是指在同一个作用域中有两个或多个函数拥有相同的名字不同的签名。函数的签名包括:参数的数量和类型,const属性,甚至参数的顺序。当编译器发现存在一个以上的具有相同名字的函数,它就会调用其中一个匹配的函数。java语言支持函数返回值的不同。
Overloading:
Signature has to be different. Just a difference in return type is not enough.Accessibility may vary freely.Exception list may vary freely.Just the name is reused. Methods are independent methods. Resolved at compile-time based on method signature.Can call each other by providing appropriate argument list.