how to add to a file using printwriter in java code example Example: java printwriter create file File Fileright = new File("C:\\NewFile.txt");