java输出包含小数位的double型数据
System.out.println("%.4f",d);
报错:The method println(double) in the type PrintStream is not applicable for the arguments (String, double)
原因:Java的输出中System是java.lang里面的一个类
public final class System
out是System里面的一个静态数据成员 ,out的类型是PrintStream类型
public final static PrintStream out = null;
java.io.PrintStream
println()是PrintStream的方法
public class PrintStream extends FilterOutputStream
implements Appendable, Closeable
{
........
........
........
/* Methods that do not terminate lines */
/**
* Prints an object. The string produce