* All class-level (member) variables are initialized before they can be used. All local variables are not initialized until it is done explicitly.
* 所有的主成员在他们使用之前被初始化 所有的局部变量必须通过显式的赋值来初始化
* An array object (as distinct from reference) is always initialized (with zeroes or nulls)
* 数组对象总是能够初始化(零或者null)
* Member initialization with the declaration has exception problems: - cannot call methods that throw a checked exception. - cannot do error recovery from runtime exceptions. - If you need to deal with errors you can put the initialization code along with try/catch statements in either a ctor (for instance fields) or in a static initialization block for static fields. You can also have instance (non-static) initialization blocks but ctors are more recognizable.
* The String class - Because string is an immutable class, its instance methods that look like they would transform the object they are invoked upon, do not alter the object and instead return new String objects. - String has methods concat(String),trim(),replace(char,char) - String has static valueOf methods for a whole bunch of primitives and for Object too (equivalent to Object.toString()). - in substring(int,int), the second arg is exclusive. - indexOf methods returns -1 for not found
* String Pool: A JVM has a string pool where it keeps at most one object of any String. String literals always refer to an object in the string pool. String objects created with the new operator do not refer to objects in the string pool but can be made to using String s intern() method. Two String references to equal strings in the string pool will be == .