well that was just my of showing that main() isn't
needed as the jvm loads and runs any "static" blocks
before anything else (including main) so if you
feel like it you do not need to use him (main).
generally you use static blocks for loading
things (i use it to connect to the database),
other people use it to load tables of constants:
Code:
private static final int POWERS_OF_2[];
static {
//
//
//
//
for(int k = 0; k < 32; k++){
POWERS_OF_2[k] = Math.pow(k, 2);
}
}
//
// now we can referrence powers of two faster
// than trying to calculate them
//
}