If you want to initialize a particular thing lots of times then go for non static else go for constructor.
For example
public class test{
int i;//you want to initialize i to 100 when any object is created then go for non static
{
i=10;
}
test(){}
test(int x)
{
}
test(String y)
{
}
public static void main(String args[])
{
test t=new test();// i will be 10 during this
//
test t1=new test("hello");// if you call this constructor also i will be 10
//
test t2=new test(10);// even if you call this constructor i will be 10
}
If you wanted to initialize in constructors then there will be code duplication
public class test{
int i;//there will be code duplication if you initialize in constructors
test(){i=10;}
test(int x)
{
i=10;
}
test(String y)
{
i=10;
}
public static void main(String args[])
{
test t=new test();// i will be 10 during this
//
test t1=new test("hello");// if you call this constructor also i will be 10
//
test t2=new test(10);// even if you call this constructor i will be 10
}
Again it will be a problem if you want to initialize i to 100 then you have to change in all constructors but if you go for non static way then you have to change in only one place