Written by
java-style
on
on
[Java 진법 변환]2진수-10진수 8진수-10진수 16진수-10진수
[Java 진법 변환]2진수-10진수 8진수-10진수 16진수-10진수
반응형
String binary = Integer.toBinaryString(127); String octal = Integer.toOctalString(127); String hex = Integer.toHexString(127); System.out.println(binary); System.out.println(octal); System.out.println(hex); 결과값 : 1111111 177 7f int b = Integer.parseInt(binary, 2); int c = Integer.parseInt(octal,8); System.out.println(b); System.out.println(c); 결과값:127 127
반응형
from http://yang-droid.tistory.com/37 by ccl(A) rewrite - 2021-11-11 22:28:15