I'm trying to write a program that writes a listing of things to a *.txt file, and everything appears to be all good and well but nothing is written in the txt file. Any help is appreciated. I won't post my code on here because it's only a small fraction, but I'm using a formatter in the form Formatter fileMaker = new Formatter("file.txt"); and then I would do something like fileMaker.format(%s, String str); but nothing turns up in the file? Thanks for the help.   
Hopefully this little bit might help, maybe I'm doing something wrong that I don't see, but I declared it as private static Formatter fileMaker; in the class and then I implement it like below.
fileMaker.format("%s%d\n", "#flightCount", flights2.size());
    for(int i=0; i<flights2.size(); i++){
        fileMaker.format("%s %s%s%d%d %d ", "#newFlight", flights2.get(i).getSourceAirport(), flights2.get(i).getDestinationAirport(),
                flights2.get(i).getTakeoffTime(), flights2.get(i).getLandingTime(), flights2.get(i).getCapacity());
    }
 
     
    