加粗划横线的地方编译有错误,请问怎么改呢???
import java.util.Scanner;
public class Lianxi {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("请输入字符串:");
StringBuilder s=input.next();
int i=s.length();
while(i>1){
s.insert(i-3,",");
i-=3;
}
System.out.println(s.toString());
}
}