int max_length =0;for(int i =0; i <5; i++){String s = reader.readLine();
strings.add(s);if(s.length()> max_length)
max_length = s.length();}/**
* 读取五个字符串,并写入字符串列表
* 求出最长字符串的长度
*/
+2
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.