title: Using indexOf on ArrayList of type Long returns -1, despite the object existing within the list
body: <p>I'm trying to retrieve the index of a certain Long value that is stored in an ArrayList. But here's what's happening:</p>
  
  <p><img src="https://i.stack.imgur.com/k3Pk1.png" alt="enter image description here"></p>
  
  <p>dex is assigned a value of -1 - which I understand means that the object doesn't exist within that arraylist. But as a matter of fact, it does. Here's how I know:</p>
  
  <p><img src="https://i.stack.imgur.com/keB3h.png" alt="enter image description here"></p>
  
  <p>So the value dex should be assigned is 0.</p>
  
  <p>Where am I messing up?</p>
  
  <p>Edit : <code>nums</code> is also an arraylist of type Long.</p>