System.out.format在哪个包中? 怎么没找到?
谢谢
------解决方案--------------------
------解决方案--------------------
当然是在java.lang中,不需要你去找。
什么版本的jdk?
------解决方案--------------------
估计是你的环境变量的问题
------解决方案--------------------
1.5之后才有。
/**
* A convenience method to write a formatted string to this output stream
* using the specified format string and arguments.
*
* <p> An invocation of this method of the form <tt>out.printf(format,
* args)</tt> behaves in exactly the same way as the invocation
*
* <pre>
* out.format(format, args) </pre>
*
* @param format
* A format string as described in <a
* href="../util//Formatter.html#syntax">Format string syntax</a>
*
* @param args
* Arguments referenced by the format specifiers in the format
* string. If there are more arguments than format specifiers, the
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* the <a href="http://java.sun.com/docs/books/vmspec/">Java
* Virtual Machine Specification</a>. The behaviour on a
* <tt>null</tt> argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
*
* @throws IllegalFormatException
* If a format string contains an illegal syntax, a format
* specifier that is incompatible with the given arguments,
* insufficient arguments given the format string, or other
* illegal conditions. For specification of all possible
* formatting errors, see the <a
* href="../util/Formatter.html#detail">Details</a> section of the
* formatter class specification.
*
* @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt>
*
* @return This output stream
*
* @since 1.5
*/
public PrintStream printf(String format, Object ... args) {
return format(format, args);
}
------解决方案--------------------
不用专门去下载,安装了jdk之后目录下有个src.zip的文件,里面就有。
------解决方案--------------------
System类在 java.lang.*包下, 而Format在java.text.*包下。
------解决方案--------------------
------解决方案--------------------
------解决方案--------------------
java.lang.Object
java.lang.System
接着找public static final PrintStream out
接点击红色PrintStream 找
从类 java.io.FilterOutputStream 继承的字段
out