I am reading "The complete
Java 2 Certification study guide" by Philip and Simon. On page 17, it writes "All member varibles that are not explicitly assigned a value upon declaration are automatically assigned an initial value", it also give a table about the initialization values for member variables. But when I do a simple
test code as following:
public class Test {
public static void main(
String argv[]){
int i;
System.out.println(i);
}
}
I got the error message:
variable i might not have been initialized
System.out.println(i);
^
So, anyone can help me on that?
Thanks.
Holly