when i compile the programme there are no errors but when i run it nothing appears to be happening
import java.io.*;
public class RedirectDemo1{
public static void main(
String args[]) throws IOException {
// set up a PrintStream pointing at a file
FileOutputStream fos =
new FileOutputStream("out.txt");
BufferedOutputStream bos =
new BufferedOutputStream(fos, 1024);
PrintStream ps =
new PrintStream(bos, false);
// redirect System.out to it
System.setOut(ps);
// do some output
System.out.println("This is a test\u4321");
int n = 37;
System.out.println("The square of " + n + " is " + (n * n));
ps.close();
}
}