title: JOptionPane won't accept long type
body: <p>I am having an issue within the parameters of my <code>JOptionPane MessageDialog</code>. I am trying to print out the list of usernames that are in my array list, along with there corresponding time stamp for when they logged in. </p>
  
  <p>Code:</p>
  
  <pre><code>Calendar currentDay = Calendar.getInstance();
  
  loginArray.add(userName);
  JOptionPane.showMessageDialog(null, loginArray.get(0), currentDay.getTimeInMillis()); 
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p><code>gui.java:299: error: no suitable method found for showMessageDialog(&lt;null&gt;,String,long)</code></p>
  </blockquote>
  
  <p>I understand what the error is saying, but I have tried to cast it to a String, etc and it won't allow me to... Should I try <code>toString</code>?</p>