printf( ) 사용시 컴파일 Error- Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int, float, char, String) - Eclipse..

CODEDRAGON Development/Java

반응형

 

 


오류 메시지

  
  
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int, float, char, String)

   

   

 

해결방법1 - 이클립스의 컴파일 버전 변경으로 해결

   

eclipse > windows > preference >

   

Java-Compiler >

Java-Compiler에서 Compiler compliance level:1.4을 1.7로 변경

변경 전   
변경 후   

   

   

 

해결방법2 - 프로젝트의 자바 컴파일 버전 변경

프로젝트 선택 > 마우스 우클릭 > Properties >

Use compliance from execution environment'CDC-1.1/Foundation-1.1 on the 'Java Build Path' 체크 해제 >

Complier compliance lever:1.4 -> 1.7로 수정

  
  

   

   

 

해결 완료!

   

 

 

반응형