Scanner in = new Scanner(System.in);
String line = in.nextLine();
String strs[] = line.split(",");
最后将strs转int就行了