What will happen if we call perform(null) ?<br /> <br /> public void perform(Object obj) {<br /> System.out.println("Object");<br /> }<br /> <br /> public void perform(Integer int) {<br /> System.out.println("Integer");<br /> }

Search Interview Questions

 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text


Java - Interview Questions and Answers

Recently asked in Capital One.
 Q1. What will happen if we call perform(null) ?

public void perform(Object obj) {

public void perform(Integer int) {
Core Java

Ans. compiler will throws error as ambiguous methods

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     overloading   method overloading     Asked in 1 Companies      intermediate

Related Questions

  Difference between Overloading and Overriding ?
  Can we overload main method in Java ?
  Can we overload constructors ?
 How is static and dynamic polymorphism achieved in Java ?
 Any real life example of Overloading and Overridding ?
 Does java supports operator overloading ?
 Can we overload abstract methods ?
 Which of the two - compile time and run time polymorphism - requires signature of the method to be different ?
 How does java identifies which method to be called in method overriding or runtime polymorphism, when both methods share the same name and signature ?

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: