title: How do you find second highest number in an integer array?
body: <p>How do you find second highest number in an integer array?</p>
  
  <p>Is this a good implementation?</p>
  
  <p>Is there a better way to do this?</p>
  
  <pre><code>public class Find2ndHighest {
      public static void main(String[] args) {
          int b[] = {2,3,1,0,5};
  
          TreeMap&lt;Integer,Integer&gt; tree = new TreeMap&lt;Integer,Integer&gt;();
          for(int i = 0; i&lt;b.length;i++){
              tree.put(b[i], 0);
          }
          System.out.println(tree.floorKey(tree.lastKey()-1));
      }
  }
  </code></pre>