您的位置:首页 > 移动开发 > Objective-C

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

2016-08-17 19:26 976 查看
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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐