title: void cannot be converted to Void in function map
body: <p>My problem is at removeDuplicates(C), why it doesn't accept it this way? Also, can somebody explain how stream works? </p>
  
  <pre><code>List&lt;String&gt; countries = new ArrayList&lt;String&gt;() { 
      {
          add("Indiaaaa");
          add("Rommania");
          add("UUUUK");
      }
  };
  countries.stream()
      .map(c -&gt; removeDuplicates(c))
      .forEach(n -&gt; System.out.print(n + " "));
  }
  </code></pre>
  
  <p>And here is the function removeDuplicates:</p>
  
  <pre><code>public static void removeDuplicates(String s) {
      char[] chars = s.toCharArray();
      Set&lt;Character&gt; result = new LinkedHashSet&lt;&gt;();
      for(Character c : chars) {
          result.add(c);
      }
      result.forEach(n -&gt; System.out.print(n));
  }
  </code></pre>