코어 자바 (중국어 번역 버전)에서 예제를 수행하고 책의 코드와 동일하게 입력했습니다.메서드 printf는 인수에 적용 할 수 없습니다.
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int, double)
가 어떻게이 권리를 만들 수 있습니다
System.out.printf("After year %d, your balance is %,.2f%n", year,balance);
그러나 Eclipse는 오류가 말한다?
일반적으로 printf는 하나의 인수 만 인쇄하지만 두 개의 인수 만 사용하려고합니다. 어떻게 'int, double'을 'object []'로 만들 수 있습니까? – Hootkai