常量折叠是编译器发现包含编译时常量的表达式,并将其替换为结果,从而有效地消除了冗余的运行时计算。// code static final int a = 2; int b = 30 * a; // folding would create int b = 60;