title: Retrieve the first and second value from the map
body: <p>What's the best way to get the first value and second value from the map. 
  I am trying to read the <code>tableLists</code> map and get the <code>first and second value</code> from the map.</p>
  
  <p>Below is the code I have in which <code>ReadTableConnectionInfo</code> is the class.</p>
  
  <pre><code>private final LinkedHashMap&lt;String, ReadTableConnectionInfo&gt; tableLists;
  
  ReadTableConnectionInfo table = tablePicker();
  
  
  private ReadTableConnectionInfo tablePicker() {
  
      Random r = new SecureRandom();
      ReadTableConnectionInfo table;
  
      if (r.nextFloat() &lt; Read.percentageTable / 100) {
          table = get first value from tableLists map
      } else {
          table = get second value from tableLists map
      }
  
      return table;
  }
  </code></pre>