Click button below to see the correct answer
© 2015 – 2016, https:. All rights reserved. On republishing this post, you must provide link to original post
0 of 1 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Time has elapsed
For multiple overloading, most specific method is chosen over generic option.
For multiple overloading, most specific method is chosen over generic option.
© 2015 – 2016, https:. All rights reserved. On republishing this post, you must provide link to original post
#
It will not compile. It gives compile-time error ” The method getValue(Integer) is ambiguous for the type Object”
#
Anything that can be the value of an Integer type will call the getValue(Integer x) method and for all the other values it will call to getValue(Object x) method.
#
It will be exception because both integer or object can be null.
#
No Mudit, you can try running the program..
#
#
#
NullPointerException?
#
No, it won’t be an exception.. this is an example of method overloading.. its just about deciding which of the methods will be chosen for a parameter NULL.
Click on Start quiz button to answer the quiz and see the correct answer.