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 |
Tags
- implement
- 코딩테스트
- SQL
- Tree
- Binary Search
- database
- simulation
- 구현
- greedy
- string
- Number Theory
- 파이썬
- sorting
- array
- Class
- Math
- 자바
- geometry
- two pointers
- Data Structure
- java
- hash table
- Binary Tree
- Stack
- Counting
- 코테
- Method
- Matrix
- dynamic programming
- bit manipulation
Archives
- Today
- Total
목록formatting (1)
코린이의 소소한 공부노트
형식화 클래스
[형식화 클래스] - 숫자와 날짜를 원하는 형식으로 쉽게 출력 가능하게 해주는 클래스 - java.text패키지의 DecimalFormat, SimpleDateFormat 클래스가 이에 해당된다. [DecimalFormat 클래스] 1. 숫자를 형식화할 때 사용하는 클래스(숫자 -> 형식 문자열) double num = 1234567.89; DecimalFormat df = new DecimalFormat("#.#E0"); String s = df.format(num); // s = "1.2E6" // 1234567.89 -> 1.2*10^6 2. 패턴에 쓰이는 기호 1) 0: 10진수(값이 없을 때, 즉 빈자리는 0으로 채움) 1234567.89 패턴 -> 결과 0 -> 1234568 0.0 -> 12..
Java
2022. 10. 21. 00:58