我看到这行令我惊讶的代码:
String res = "", currentLine;
while ((currentLine = rd.readLine()) != null) {
res+= currentLine;
}
变量 currentLine 之前没有在任何地方定义,奇怪的是它不会抛出任何错误? java 是否以某种方式使 currentLine 成为此处的关键字?
谢谢!
最佳答案
事实上,currentLine
已被定义:
String res = "", currentLine;
与
相同String res = "";
String currentLine;
关于java - currentLine在java中充当关键字吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34970231/