● String 类:代表字符串。Java 程序中的所有字符串字面量(如:”abc” )都是此类的实例。
● String 是一个 final 类,代表 不可变的字符序列 。
● 字符串是常量,用双引号( “” )引起来表示。它们的值在创建之后不能改变。
● String 对象的字符串内容是存储在一个字符数组 value[] 中的。
public final class String
implements java.io.Serializable, Comparable<String>, CharSequence {
/** The value is used for character storage. */
private final char value[];
/** Cache the hash code for the string */
private int hash; // Default to 0
...
}