import java.util.Scanner;
public class CCCC {
public static void main(String[] args) {
String input =null;
Scanner nn = new Scanner(System.in);
System.out.println("输入:");
String a = nn.nextLine().replace(' ',',');
System.out.println(a);
}
}
上面的随手写写,也写对呀……哪有.read()?是next()吗?是nextLine()!这个好用了