问答详情
源自:-

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) 是什么意思

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) 是什么意思

提问者:什么是JAVA 2015-12-25 14:42

个回答

  • 雪糕梦龙
    2015-12-25 14:47:56

    传入的参数类型不对,printf(String,Object[]),需要一个Object数组.你传进去的是一个double,需要new一个数组,把你要传的double放进去.