java.lang.StringIndexOutOfBoundsException: String index out of range: 22
报错:in thread “main” java.lang.StringIndexOutOfBoundsException: String index out of range: 22原因:for (int i = 0; i < 255; i++)输入的字符串只有22个,而for循环,循环255次解决方案:输入的是字符串,for (int i = 0; i < n.length(); i++)...