【发布时间】:2016-05-24 22:24:07
【问题描述】:
在java.io.BufferedWriter中有一个方法:
/**
* Our own little min method, to avoid loading java.lang.Math if we've run
* out of file descriptors and we're trying to print a stack trace.
*/
private int min(int a, int b) {
if (a < b) return a;
return b;
}
这种方法的意义何在?加载java.lang.Math需要额外的文件描述符?
如果我用-verbose:class 编译并运行空程序
public class Main {
public static void main(String[] args) {
}
}
我会进入日志:
[Loaded java.lang.Math from /opt/jdk/jdk1.8.0_65/jre/lib/rt.jar]
【问题讨论】:
-
哈!可能写于 1995 年。
-
我认为该评论的描述性已经足够了。你有什么问题?
标签: java java-io bufferedwriter