[Solved] What will be the output if the argument’s date type is different?


In overloading method resolution if the matched method with specific argument is not available the compiler won’t raise any error immediately,
First it promotes the argument to the next level and check for matched method.
1)If the matched method is available then it will be considered and if it is not available then compiler once again promotes this argument to the next level.
2)This process will be continued until all the possible promotions still if the matched method is not available.Then only we will get compile error.
3)This is called automatic promotion in overloading.
The following are the possible promotions in java
Byte->short/char->int->long->
float->double

1

solved What will be the output if the argument’s date type is different?