Java automatically initialises all non-local variables with a default value, i.e. 0 or null, even chars. However Java does not automatically initialise local variables, though it will initialise any arrays or objects newly created to be stored in local variables. The Java compiler is clever. If you forget to initialise when it is required, it will tell you at compile time.
拥有static存储类型的变量,如果没有提供初始值,则会初始化为0
C是这样描述的:
pointer is null pointer
arithmetic type is zero
aggregate type according to these rules
the first named member of union according to these rules