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, double) at MainClass.main(MainClass.java:16) 是什么意思
传入的参数类型不对,printf(String,Object[]),需要一个Object数组.你传进去的是一个double,需要new一个数组,把你要传的double放进去.