hi all,
i usually see some code in a class simply like this:
class A{
int i;
static{
int i=1;
void amethod(){
}
// more variables and methods may added there
}
public static void main(
String[] args){
//code omitted there
}
}
i just know that the static block always executes before the main method, i am wondering that what's the use of the static block , i don't know why !!
Needing your help...
[This message has been edited by Tony Sam (edited December 10, 2001).]