The short answer: call close() on the BufferedWriter before exiting your program.
Longer answer: the BufferedWriter will hold the data in an internal buffer (hence the name!) until it gets a certain amount; then the buffer is full, and it's flushed all at once out to the file. You're writing a tiny bit, which is still in the buffer when the program exits. The file itself is closed automatically, but not the BufferedWriter, and so its buffered data is simply lost.