package ch05.sec05;
public class CharAtExample {
public static void main(String[] args) {
String ssn="950410240124";
char gender=ssn.charAt(6);//문자 추출
int length =ssn.length();//문자 길이
System.out.println("주민등록번호의 길이는 " +length);
switch ((gender-48)%2) {
case 1:
{
System.out.println("남자");
break;
}
case 0:
{
System.out.println("여자");
break;
}
}
}
}