用法
String test = "abcd";
int a = test.charAt(0);//输出97
char b = test.charAt(0);//输出a
源码解释
Returns the char value at the specified index. An index ranges from 0 to length() - 1.
The first char value of the sequence is at index 0, the next at index 1, and so on,
as for array indexing.
If the char value specified by the index is a surrogate, the surrogate value is returned.
但是源码里面只有char型的charAt, int型是怎么来的就不知道了