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
This is showing FileNotFound Exception and IoException.