title: Convert a Linked List of type Integer to Set of type String in JAVA
body: <p>I have a <code>List</code> of <code>Integers</code> but I would like to take that <code>List</code> and convert it to a <code>HashSet</code>.</p>
  
  <p>For example my list is as follows:</p>
  
  <pre><code>1234
  5678
  1234
  7627
  4328
  </code></pre>
  
  <p>But I would like to take that <code>list</code> and convert the string of integers to a <code>HashSet</code> so it doesn't include repeats. What is the best way to accomplish this?</p>
  
  <p>My <code>list</code> is defined as</p>
  
  <pre><code>static List&lt;Integer&gt; list;
  </code></pre>
  
  <p>And my <code>HashSet</code> is defined as</p>
  
  <pre><code>static HashSet&lt;String&gt; set = new HashSet&lt;String&gt;(list);
  </code></pre>
  
  <p>My error is that I can't convert from int to string so what can I do to solve this?</p>