±Û¾´ÀÌ :±èÂù 2000³â 1¿ù 27ÀÏ 14:57:24
In Reply to: [Áú¹®] int ÇüÀ» charÇüÀ¸·Î º¯È¯ÇÏ´Â ¹ý (type castingÀÌ ¾ÈµË´Ï´Ù) posted by ¹ÚÀçÇü on 2000³â 1¿ù 27ÀÏ 10:33:16:
Ȥ½Ã charÇü ¸»±¸ String À¸·Î ÇÏ¸é ¾ÈµÇ³ª¿ä
½ºÆ®¸µÀº Integer.toString(º¯°æÇÏ°íÀÚÇÏ´ÂINT);
ÀÌ·¸°Ô ÇÏ¸é µÇ°í¿ä...
int count = 3;
char key = '0';
key = (char)(count - 1);
========================
int count =3;
String key = "0";
key = Integer.toString(count-1);
±×·¯¸é 2°¡ Ãâ·ÂµÉ°ÍÀÔ´Ï´Ù.