%d%s -> printf -> PrintWriter -> PrintStream-> Writer -> System -> native

PrintWriter는 출력스트림 클래스이고 PrintStream에 있는 메서드를 모두 구현하고 Writer 클래스를 상속받는다.

 - PrintWriter 클래스에는 print, println, printf, apend메서드 등이 있다

 - printf 호출 방식 : out.printf(format, args)

1. %d : 정수 출력 2. %s : 문자열 출력 3. %c : 문자 출력 4. %f : 실수 출력

ex>
System.out.printf("문자열 출력 : %s", "hello world");
System.out.printf("숫자 출력 : %d", 1243);
Printwriter out = response.getWriter();
out.append(String.format(">name:%s >age:%b " , name, age);

native : 자바에서 다른 언어로 구현된 것을 사용할 수 있게 해주는 키워드 <more>https://fors.tistory.com/80

 

 

· initializer 초기화 instantiated 인스턴스화

+ Recent posts