[英]System.out.format in Java
I'm trying to make a formatted output in Java but I'm having some trouble... I write for example: 我正在尝试用Java进行格式化输出,但是遇到了一些麻烦...例如,我写:
System.out.format ("%d", 5);
but Eclipse underlines the word "format" and there is a marker at this line saying: 但是Eclipse在“格式”一词下加了下划线,这行上有一个标记说:
The method format(String, Object[]) in the type PrintStream is not applicable for the arguments (String, int). 类型PrintStream的方法format(String,Object [])不适用于参数(String,int)。
Most likely the problem is that you are not using Java 1.5 or higher. 最有可能的问题是您没有使用Java 1.5或更高版本。 Please check the version in your build. 请检查内部版本。 In Eclipse, this is: 在Eclipse中,这是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.