์๋ฐ์ ๊ธฐ๋ณธ ํ์ ์ ํด๋์คํํ 8๊ฐ ํด๋์ค
์ฌ๋ฌ ์ซ์, ๋ฌธ์ ๋ณํ ํ์ฉ
public class WrapperEx {
public static void main(String[] args) {
char c1 = 'A', c2 = 'b', c3 = '1';
System.out.println(Character.isDigit(c3)); //์ซ์๋ฅผ ํธ๋ฃจํ์ค๋ก
System.out.println(Character.toLowerCase(c1)); //๋๋ฌธ์๋ฅผ ์๋ฌธ์๋ก
System.out.println(Character.toUpperCase(c2)); //์๋ฌธ์๋ฅผ ๋๋ฌธ์๋ก
String str = Integer.toString(33); //์ซ์๋ฅผ ๋ฌธ์๋ก ๋ณํ
System.out.println(str);
str = Integer.toHexString(30); //์ซ์๋ฅผ 16์ง์ ๋ฌธ์๋ก ๋ณํ
System.out.println(str);
str = Integer.toBinaryString(30); //์ซ์๋ฅผ 2์ง์ ๋ฌธ์๋ก ๋ณํ
System.out.println(str);
int i = Integer.parseInt("123"); //๋ฌธ์๋ฅผ ์ซ์๋ก ๋ณํ
System.out.println(i);
}
}
jdk1.5๋ถํฐ๋ ์๋ ๋ฐ์ฑ, ์ธ๋ฐ์ฑ์ด ๋๋ฏ๋ก ์ ํ ๋ฐ๋ก ํด์ค ํ์ ์์
728x90
๋ฐ์ํ
0