Originally posted by memati bas:
Hi,
I heard that Java does not automatically initialise local variables, though it will initialise any arrays or objects newly created to be stored in local variables. but the code that I sent deny this.
Why???
In this case b is indeed a local variable (therefore not initialized to anything) and there is no "object newly created" hence the error.