在创建FileOututStream文件字节输出流对象时,显示我传入的参数不正确,不明白我错在哪了
public class FileOutputStream {
public static void main(String[] args) {
FileOutputStream fileOutputStream = new FileOutputStream("d:\\a.txt");
}
}
在创建FileOututStream文件字节输出流对象时,显示我传入的参数不正确,不明白我错在哪了
public class FileOutputStream {
public static void main(String[] args) {
FileOutputStream fileOutputStream = new FileOutputStream("d:\\a.txt");
}
}
应该是需要抛异常 throws FileNotFoundException
public static void main(String[] args) throws FileNotFoundException {
FileOutputStream fileOutputStream = new FileOutputStream("d:\\a.txt");
}