charAt() 方法用于返回指定索引处的字符。索引范围为从 0 到 length() - 1。
public class Test { public static void main(String args[]) { String s = "abc"; char result = s.charAt(0); System.out.println(result); }
public class Test { public static void main(String args[]) { String s = "abc"; char result = s.charAt(0); System.out.println(result); }