The String class represents strings. All string literals (such as "ABC") in a Java program are implemented as instances of this class.
(This is not much to understand, often using class)
Public interface Charsequence {
public int length ();
public char charAt (int index);
Public charsequence subsequence (int start, int end);
Public String toString ();
}
Public final class String implements Serializable, comparable, charsequence {
Xxxxxx
}
String inside the method a lot of will not write, should be able to see different.
This is an interface: in JDK1.4, the introduction of the Charsequence interface, the implementation of this interface class has: Charbuffer, String, StringBuffer, StringBuilder this four class.
Charbuffer is a class used in NiO, string implements this interface for granted, StringBuffer is also a charsequence,stringbuilder Java is a class that plagiarism C #, The basic and StringBuffer classes are as efficient as they are, but they are not guaranteed to be thread-safe and can be considered in environments that do not require multi-threading.
Charsequence and string
in Android