package com.thinkinjava.io;

import java.io.PrintStream;
import java.io.PrintWriter;

public class PrintStreamVsPrintWriter {
    public static void main(String[] args) throws Exception{
        PrintStream stream = new PrintStream("1.txt");
        stream.print("a" + 1.1 + "我");
        stream.print(1.1);
        stream.close();

        PrintWriter writer = new PrintWriter("2.txt");
        writer.print("a" + 1.1 + "我");
        writer.print(1.1);
        writer.close();
    }
}
