16진수1 LiteralsTest public class LiteralsTest { //int aaa; LiteralsTest(){ int a; } public static void main(String[] args) { byte a = 68; //auto-casting(int가 기본형4byte이지만 byte(1byte)의 범위에 해당하는 수(-128~127)는 자동으로 캐스팅함) (byte)68 강제캐스팅 System.out.printf("a: %d\n",a); //%d 정수형 출력 char b = 'A'; System.out.printf("b: %d, %c\n", (int)b, b); //%c 문자형 출력 int decimal = 100; //10진수 int octal = 0144; //8진수 int hexa = 0x64; //16진.. 2022. 9. 29. 이전 1 다음