pastebin

Paste Search Dynamic
Recent pastes
Arrays List
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.stream.*;
  4. import java.util.*;
  5.  
  6. /* Name of the class has to be "Main" only if the class is public. */
  7. public class Main
  8. {
  9.         public static void main (string[] args)
  10.         {
  11.                 List<List<String>> list = arrays.asList(
  12.   arrays.asList("a"),
  13.   arrays.asList("b"));
  14.                 system.out.println(list);
  15.   system.out.println(list
  16.   .stream()
  17.   .flatMap(collection::stream)
  18.   .collect(Collectors.toList()));
  19.         }
  20. }
Parsed in 0.014 seconds