将局部变量的作用域最小化,可以增强代码的可读性和可维护性,并降低出错的可能性。 参考 《Effective Java》(第2版) (美)Joshua Bloch 著 发表评论 Post Directory