[JAVA] 자릿수 만큼 0으로 채우기.. 예를 들어.. 3자리수를 표현한다고 하면, 001,002,010 뭐 이런식으로 표현하고 싶을때가 있다. (일련번호등을 표시할때 ) 아래와 같이 하면 쉽게 표현할 수 있다. int serial = 3; String suffix = String.format(“%03d”, serial); System.out.println(suffix); 결과는 “003” Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window) Related Posted on 2014-08-18 10:23 AM by andrew Comment 📂This entry was posted in JAVA 참고를 위한 저장물
2014-06-12 andrew 한글자씩 배경색이 바뀌면서 강조되는 텍스트한글자씩 배경색이 바뀌면서 강조되는 텍스트 <head> <script type="text/javascript"> < !-- 태그인넷 www.tagin.n...