fork download
  1. class HelloWorld {
  2. public static void main( String[] args ) {
  3. String names = "Peter, John, Andy, David";
  4. System.out.println(String.join(",", names.split(", ")));
  5. }
  6. }
  7.  
Success #stdin #stdout 0.04s 4386816KB
stdin
2
4
stdout
Peter,John,Andy,David