/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入你的字符串:");
String str = sc.nextLine();
//方式一:所谓的方法求出字符串长度底层代码这么些:
/**
* Returns the length of this string.
* The length is equal to the number of <a href="Character.html#unicode">Unicode
* code units</a> in the string.
*
* @return the length of the sequence of characters represented by this
* object.
*/
/* public int length() {
return value.length;
}
// The value is used for character storage.
// private final char value[];