public static final float ERGB_EXP_SCALE[];
static
{
// Construct the scale arrays for the exponents.
ERGB_EXP_SCALE = new float [256];
for (int i = 0; i < 256; i++)
ERGB_EXP_SCALE[i] = (float) (ERGB_SCALE*FastMath.pow(2.0, i-128));
}
第一次见这样的代码,主要是我看专业的代码太少了,据这段代码我的理解是ERGB_EXP_SCALE[]作为外部可引用而不可修改的静态变量却又需要进行数组初始化,故使用Static;
不知道这样理解是否正确,大家多多交流