OnJava8-Examples/io/ChangeSystemOut.java

14 lines
328 B
Java
Raw Normal View History

2015-04-20 15:36:01 -07:00
//: io/ChangeSystemOut.java
2015-05-29 14:18:51 -07:00
// <20>2015 MindView LLC: see Copyright.txt
2015-04-20 15:36:01 -07:00
// Turn System.out into a PrintWriter.
import java.io.*;
public class ChangeSystemOut {
public static void main(String[] args) {
PrintWriter out = new PrintWriter(System.out, true);
out.println("Hello, world");
}
} /* Output:
Hello, world
*///:~