Firstly, sorry the question is not phrased well.
I am wondering if there is a was of a java program to automatically store what the program prints out in a text file.
example:
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
How would I get the program to save what is printed in the console, in this case "Hello World!" to appear in a text file, for instance in notepad.
Any help is appreciated Thanks!