title: Checking for duplicates in an int array
body: <p>Would this be the correct method to check whether an integer array contains duplicates? I wanted to pass in an int[] nums instead of Integer[], but couldn't get that to work.</p>
  
  <pre><code>public static boolean isUnique(Integer[] nums){
      return new HashSet&lt;Integer&gt;(Arrays.asList(nums)).size() == nums.length;
  }
  </code></pre>