Re: Constructors



okay uhm I asked this to a friend of mine, but he only knows C++ and he
understood, and I'll give the example here.
In C++ it would be done as the following :

class test1 {
static int i_1, i_2;
test1(int i, int i2): i_1(i), i_2(i2) { }
}

This means that it will automatically assign the value of i to i_1 and
i2 to i_2 without the code :

class test1 {
static int i_1, i_2;
test1(int i, int i2) {
i_1 = i;
i_2 = i2;
}
}

Is there a way to do this in java?

Hope its worded better

Marc

.