package com.wyq.file;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class TestOutP {
public static void main(String[] args) throws IOException {
// OutputStream os = new FileOutputStream("d:\\b.txt");
OutputStream os = System.out;
os.write('a');
System.out.println();
os.write(97);
System.out.println();
os.write("helloworld".getBytes());
System.out.println();
System.out.write("apple".getBytes());
os.close();
PrintStream ps = System.out;
ps.println("\n");
ps.println("hello");
ps.println(true);
ps.write(97);
//ps相当于System.out的意思,可以等量替换
System.out.println("\t");
System.out.println("hello");
ps.close();
}
}