R
Rene
I jus realized that I can change the values of "static variables" and
"instance variable" through the standard constructor This means that
something like this will compile:
public class SomeClass
{
public SomeClass()
{
abc++; // Instance Variable
xyz++; // Static Variable
}
int abc;
static int xyz;
}
However, if instead of using the standard constructor I use a static
constructor, I can only initialize the static variables. The thing that gets
me, is that I always looked at static members on a world of their own
totally separated from the instance class world. But now it looks like the
static variable is going transsexual on me.
Am I missing something? Am I the only one that thinks this behavior is kind
of breaking the rules?
Thanks.
"instance variable" through the standard constructor This means that
something like this will compile:
public class SomeClass
{
public SomeClass()
{
abc++; // Instance Variable
xyz++; // Static Variable
}
int abc;
static int xyz;
}
However, if instead of using the standard constructor I use a static
constructor, I can only initialize the static variables. The thing that gets
me, is that I always looked at static members on a world of their own
totally separated from the instance class world. But now it looks like the
static variable is going transsexual on me.
Am I missing something? Am I the only one that thinks this behavior is kind
of breaking the rules?
Thanks.