- org.apache.commons.lang3.StringUtils의 leftPad, rightPad 이용
- String.format 이용
http://fruitdev.tistory.com/m/post/177
[Java] 특정 자리수 만큼 0으로 공백 채우기(String.format())
MySQL에는 ZeroFill 이라는 옵션이 있다. ZeroFill에 대해 아주 간단하게 설명하면 숫자로 이루어진 값이 있을때 특정 자릿수만큼 값을 0으로 채우는 것이다. 즉 int(8)로 정의된 "3"이라는 숫자가 있다면
fruitdev.tistory.com
https://examples.javacodegeeks.com/string-format-java-example/
String.format Java Example | Examples Java Code Geeks - 2021
In this post, we feature a comprehensive String.format Java Example. In Java, printf is exactly like string.format, but it does not return anything, it
examples.javacodegeeks.com
'java' 카테고리의 다른 글
Java JCE(Java Cryptography Extension) AES (0) | 2016.06.08 |
---|---|
자바용 ffmpeg 래퍼 JAVE 소개 (0) | 2016.05.25 |
Java Properties 사용방법 (0) | 2015.11.11 |
apache httpclient (0) | 2015.09.22 |
자바 한글인코딩 문제 모음 (0) | 2015.08.06 |