fork(4) download
  1.  
  2. import java.util.List;
  3. import java.util.Arrays;
  4.  
  5. class Main {
  6.  
  7. public static void main(String[] args) {
  8.  
  9. List<String> nomes = Arrays.asList("Paulo", "Ana", "Zeno", "Beno");
  10. String todosNomes = String.join(", ", nomes);
  11.  
  12. System.out.println(todosNomes);
  13.  
  14. }
  15.  
  16. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
Paulo, Ana, Zeno, Beno