![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdBe12p%2FbtsgsQ9GU36%2Fil8fmnFqJ7tr5eeJKMIHc0%2Fimg.png)
[국비훈련과정 08] Java - Printf / String.Format(=서식제어문자)
·
TIL
package Operator; public class Ex06 { public static void main(String[] args) { 서식 제어 문자 printf 혹은 String.format 함수를 사용할 때 다른 값을 채워넣을 수 있는 빈 칸을 만들어주는 문자 서식제어 문자에 맞는 자료형의 값을 넣어줘야 한다. System.out.printf("pi : %f\n", "3.14"); java.util.IllegalFormatConversionException: f != java.lang.String : 잘못된 서식 변환 예외 %s : String , 문자열을 출력 %d : decimal, 정수를 10진수 형식으로 출력한다. %o : octal , 정수를 8진수 형식으로 출력 %x : HexaDe..