初学者发问:The constructor Printwriter(String) is undefined

菜鸟发问:The constructor Printwriter(String) is undefined怎么提示我:The constructor Printwriter(Str

菜鸟发问:The constructor Printwriter(String) is undefined
怎么提示我:The constructor Printwriter(String) is undefined
需要import哪个包呢?

[解决办法]
PrintWriter 'W'是大写的。
[解决办法]
PrintWriter(String fileName) 
创建具有指定文件名称且不带自动行刷新的新 PrintWriter。

楼主最后 close()没有?

或者手动flush()一下