Access is denied when using FileOutputStream
问题 I'm having an issue getting this to work. It takes in a string which consists of several pieces of information put together. However, when I try to write the String to a file in order to track changes in the program over time, I receive an access is denied error: void writeToFile(String input) throws Exception{ File file = new File("C:\\WeatherExports\\export.txt"); if(!file.exists()){ file.createNewFile(); } BufferedWriter inFile = new BufferedWriter(new FileWriter(file,true)); try{ inFile