Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- ios
- async
- RxSwift
- noncopyable
- 클로저
- Self
- observable
- 생명주기
- 차이
- 안드로이드
- 프래그먼트
- 스위프트
- concurrency
- 프로퍼티
- 알고리즘
- 구조체
- weak
- 자바
- 옵셔널
- 리스트뷰
- rx
- 프로그래머스
- 풀이
- Swift
- Subject
- 이스케이핑
- 백준
- 해시
- 연산자
- View
Archives
- Today
- Total
study record
자바 10진수, 2진수, 8진수, 16진수 변환 본문
자바의 10진수를 2진수, 8진수, 16진수로 만들기
- String octalString = Integer.toOctalString(i); //8진수
- String hexString = Integer.toHexString(i);
- String binaryString = Integer.toBinaryString(i); //2진수
10진수로 만들기
- int binaryToOctal = Integer.parseInt(octalString, 8);
- int binaryToHex = Integer.parseInt(hexString, 16);
- int binaryToDecimal = Integer.parseInt(binaryString, 2);
'알고리즘' 카테고리의 다른 글
[프로그래머스-자바] 크레인인형뽑기게임 (2019카카오개발자겨울인턴십) (0) | 2021.05.06 |
---|---|
[프로그래머스-자바] 동적계획법 (0) | 2021.05.06 |
순열과 조합(자바) (0) | 2021.05.04 |
[프로그래머스-자바] 수식 최대화 (2020카카오인턴십) (0) | 2021.05.04 |
[프로그래머스-자바] 스택/큐 Stack/Queue (0) | 2021.05.04 |