자바 프로그래밍/코드
대문자를 소문자로 변환하는 문제
구리Guri
2020. 2. 10. 23:47
import java.io.IOException;
public class Quiz_03 {
public static void main(String[] arg) throws Exception {
System.out.print("문자 입력 : ");
int word = System.in.read();
System.out.println("=======출 력========");
System.out.println("입력하신 문자 : " + (char)word);
System.out.println("소문자로 변환 : " + (char)(word+32));
//대문자와 소문자 아스키코드 차이는 32!! 대문자 아스키코드값 + 32 = 소문자 아스키코드값
}
}