我在让 java 识别我的 PrintWriter 对象“out”时遇到了一些麻烦。我不确定问题是什么。
public void storeInput(String fileName)
{
String folderName = "C:/temper/testy/";
File filetest = new File(folderName, fileName);
System.out.println("ENTER TEXT!!!!!");
String input = sc.nextLine();
try {
PrintWriter out = new PrintWriter(
new BufferedWriter(
new FileWriter(filetest)));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
out.println(filetest);
out.close();
}