title: How to print Unique Squares Of Numbers In Java 8?
body: <p>Here is my code to find the unique number and print the squares of it. How can I convert this code to java8 as it will be better to stream API?</p>
  
  <pre><code>List&lt;Integer&gt; numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);
  HashSet&lt;Integer&gt; uniqueValues = new HashSet&lt;&gt;(numbers);
  
  for (Integer value : uniqueValues) {
      System.out.println(value + "\t" + (int)Math.pow(value, 2));
  }
  </code></pre>