7 Comments

  1. sunil

    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.

    Reply
  2. mudit

    It will be exception because both integer or object can be null.

    Reply

    • No Mudit, you can try running the program..

      Reply
  3. Daniel Couillard

    NullPointerException?

    Reply
    • admin

      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.

      Reply

Leave a Reply