class Test{
public static void main(String[] args) throws FileNotFoundException {
OutputStream output = new FileOutputStream("E:\\java_file\\Files_io\\fileTest.txt");
PrintStream printOut = new PrintStream(output);
System.setOut(printOut);
}
}