title: Sorting ArrayList full of objects by their id using Collections.sort(arrayListName)
body: <p>I have an inventory class which creates an ArrayList full of objects Item, which is a class as well. I know that I have to call
      <code>Collections.sort(items);</code> in order to sort the ArrayList (it's called items by the way). The assignment says that I have to use an interface on the Item class, I don't know whether or not to implement Comparator or Comparable and then what to write for either the <code>compareTo()</code> method or the <code>compare()</code> method respectfully. Also I have the <code>Collections.sort(items)</code> call right after I declare my ArrayList, is this okay?</p>
  
  <p>Edit: My teacher just clarified that she wants us to implement <code>Comparable&lt;Item&gt;</code> on the Item class.</p>