Notice
Recent Posts
Recent Comments
Link
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

우기TIL

JAVA / int 형 선언시 다른 진수로 선언하는법 본문

서버

JAVA / int 형 선언시 다른 진수로 선언하는법

우기왕 2021. 7. 7. 15:22
  • 10진수 ( 일반적으로 선언하면 됨 )
    int a = 10; // 10
  • 2진수 ( 접두사로 "0B" )
    int a = 0B1010; // 10
  • 8진수 ( 접두사로 "0" )
    int a = 012;  // 10
  • 16진수 ( 접두사로 "0X" )
    int a = 0XA // 10
Comments