I know that if i have some loop, for example, i can prints something out e.g. elements in an array, to the screen. Is it possible to instead printing these elements to the screen, print to a text file???
BAsically, is there a way to print to a file as oppsed to the screen?
Java Considers the System.out as a Stream so is a File. Create a BufferedWriter with FileOutputStream and it will print the data to a file. See API for more help on these. Is should be simple. Tell me if you face trouble
you should check out the I/O Trail from the Java tutorial (see link in my sig). This should help you understand how writing to a file is similar to writing to the screen (at least if you have been using the I/O Stream API already).