Why is BufferedWriter not writing to file?
问题 I have this code: String[] strings = {"Hi" , "You", "He", "They", "Tetrabenzene", "Caaorine", "Calorine"}; File file = new File("G:\\words.txt"); FileWriter fWriter; BufferedWriter bWriter; try { if((file.exists())) { file.createNewFile(); } fWriter = new FileWriter(file.getAbsoluteFile(), true); bWriter = new BufferedWriter(fWriter); //Convert Result objects to JSON and write to file for(int j = 0; j < strings.length; ++j) { bWriter.write(strings[j]); bWriter.newLine(); System.out.println(