public byte[] getBytes(Charset charset) Encodes this String into a sequence of bytes using the given charset, storing the result into a new byte array. This method always replaces malformed-input and unmappable-character sequences with this charset'…
String类定义实现了java.io.Serializable, Comparable<String>, CharSequence 三个接口:并且为final修饰. public final class String defined String由char[]数组实现 /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the strin…