title: Looking for an effective way to remove part of each item from the List<String>
body: <p>I have list of string items and I am trying remove the part of the string in each item and create new list with it. I am able to achieve it using below code but I feel there will be a better way of handling this using stream api's. Please let me know if any better approach available for this problem</p>
  
  <p>Please see below for example(simplified for explanation) </p>
  
  <pre><code>    List&lt;String&gt; list = new ArrayList&lt;String&gt;();
      list.add("Value1.1,Value1.2,Value1.3,Value1.4,Value1.5,Value1.6");
      list.add("Value2.1,Value2.2,Value2.3,Value2.4,Value2.5,Vaule2.6");
  
      List&lt;String&gt; newList = list.stream().map(i -&gt; {
              List&lt;String&gt; l = Arrays.asList(i.split(","));
              return StringUtils.join(ListUtils.sum(l.subList(0, 2),l.subList(4, l.size())),",");
              }).collect(Collectors.toList());
  
  newList.forEach(System.out::println);
  //    Value1.1,Value1.2,Value1.5,Value1.6
  //    Value2.1,Value2.2,Value2.5,Value1.6
  </code></pre>
  
  <h3>Problem Statement:</h3>
  
  <ul>
  <li>Input is "list"(List of String)</li>
  <li>Iterate each item in the list and split each item by comma and drop 3rd and 4th element and rejoin the string</li>
  <li>Create new list with new string item</li>
  </ul>
  
  <p>used: StringUtils, ListUtils from org.apache.commons</p>
  
  <h3>Expected Output:</h3>
  
  <p>Value1.1,Value1.2,Value1.5,Value1.6</p>
  
  <p>Value2.1,Value2.2,Value2.5,Value2.6</p>