首页 > 系统服务 > 详细

Eclipse中使用printf报错 提示参数类型不对 已解决The method printf(String, Object[]) in the type PrintStream is not ap

时间:2019-05-22 14:05:03      阅读:464      评论:0      收藏:0      [点我收藏+]

引用:https://blog.csdn.net/chenhao0568/article/details/52233783

Eclipse中 JAVA默认的兼容版本为1.4, 改为1.5及以上版本就行。 项目 》属性》Java complier》complier compliance lever:1.5

 技术分享图片

 

 

System.out.printf("%f",d);//"f"表示格式化输出浮点数。

就正常了。

 

1.4版本 中 printf参数类型不一样,所以报错。

The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int)



Eclipse中使用printf报错 提示参数类型不对 已解决The method printf(String, Object[]) in the type PrintStream is not ap

原文:https://www.cnblogs.com/jarekpierre/p/10905477.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!