문자열(String)의 index위치에 있는 한 글자를 'char'타입으로 리턴한다.
public class gyujin { public static void main(String[] args) { String str = "Hello"; System.out.println(str1.charAt(0)); // 첫글자(H) System.out.println(str.charAt(str.length()-1));// 마지막글자(o) } }