去掉逗号就行。
import java.util.Scanner;public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);while(sc.hasNext()) {
String s = sc.next();char[] str = s.toCharArray();for (int i = 0; i < 19; i++) {
if(i == 5 || i ==13){
str[i] = ' ';}}for (int i = 0; i < 19; i++) {
System.out.print(str[i]);}System.out.println();}}
}