title: Which overload will get selected for null in Java?
body: <p>If I write this line in Java:</p>
  
  <pre><code>JOptionPane.showInputDialog(null, "Write something");
  </code></pre>
  
  <p>Which method will be called?</p>
  
  <ul>
  <li><code>showInputDialog(Component parent, Object message)</code></li>
  <li><code>showInputDialog(Object message, Object initialSelectionValue)</code></li>
  </ul>
  
  <p>I can test it. But in other cases similar to this, I want to know what happens.</p>