Java

n진수 간단 변환

SouthernDuck 2023. 8. 9. 17:21
728x90

 

1. n진수 -> 10진수

- Integer.parseInt(변수, n);

 

2. 10진수 -> n진수

- Integer.toString(변수, n);

- Integer.toBinaryString(변수) : 2진수

- Integer.toOctalString(변수) : 8진수

- Integer.toHexString(변수) : 16진수

728x90
반응형