File file = new File("D:/projects/tFile.txt") ;
file.createNewFile(); //Unhandled exception type IOException
FileOutputStream fout = new FileOutputStream(file); //Unhandled exception type FileNotFoundException
String s = "Cricket";
byte []b = s.getBytes();
fout.write(b);//Unhandled exception type IOException
fout.close();// Unhandled exception type IOException
これはFileNotFound ExceptionとIoExceptionを示しています。このコードはエラーを示しています。このコードで何が問題になっていますか?
例外が原因である可能性があり、どのようなエラーがで発生したライン、および*完全な*エラーテキスト。 – azurefrog
あなたは何が起こっているのか、何が起こっているのか、潜在的な修正が何であるかを理解するために、エラーをGoogleに気付かれましたか? – tnw
エラーメッセージも読んだことがありますか? – SLaks