728x90
숫자를 이진법으로 치환
10진법 숫자를 이진법 문자열로 바꾸기
my google query = java int to bit
Print an integer in binary format in Java
https://stackoverflow.com/questions/5263187/print-an-integer-in-binary-format-in-java
int x = 100;
System.out.println(Integer.toBinaryString(x));
Integer.toString(100,8) // prints 144 --octal representation
Integer.toString(100,2) // prints 1100100 --binary representation
Integer.toString(100,16) //prints 64 --Hex representation
https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#toBinaryString-int-
728x90