日期:2014-05-20  浏览次数:20700 次

这个for循环语句怎么理解?
for (String str3 = localBufferedReader.readLine(); ; str3 = localBufferedReader.readLine())

------解决方案--------------------
这个蛋疼的写法。。。
相当于
String str3 = localBufferedReader.readLine();
while(true) {
 str3 = localBufferedReader.readLine();
}

那个for来读文件缺少文件读取结束的判断,是有问题的,中间应该还有一个str3!=null
------解决方案--------------------
楼上正解,一般c程序员喜欢这种风格。