【发布时间】:2011-06-12 19:07:55
【问题描述】:
在 Java 中,有什么区别(就性能而言):
for (int i = 0; i < count; i++) {
try {
// code that throws Exception
} catch (Exception e) {
e.printStackTrace();
}
}
和
try {
for (int i = 0; i < count; i++) {
// code that throws Exception
}
} catch (Exception e) {
e.printStackTrace();
}
【问题讨论】: