そのため、紛らわしいコンストラクターに出くわしたとき、私は String クラスを読んでいました。コードは次のようになります
public final class String
implements java.io.Serializable, Comparable<String>, CharSequence {
/** The value is used for character storage. */
private final char value[];
/** Initializes a newly created {@code String} object so that it represents
* an empty character sequence. Note that use of this constructor is
* unnecessary since Strings are immutable.
*/
public String() {
this.value = "".value;
}
// the rest of the class code
}
私は何を理解していません
"".value;
行う。これは何""
ですか?それは新しいString object
ですか?もしそうなら、どのコンストラクタで?