read public int read() throws IOException Reads a byte of data from this input stream. This method blocks if no input is yet available.
Specified by: read in class InputStream Returns: the next byte of data, or -1 if the end of the file is reached. Throws: IOException - if an I/O error occurs.
------解决方案-------------------- 完全不懂你要问什么,你的代码中之所以要catch异常是因为你的方法体是没有异常抛出的,但是你方法体内部却是有异常的。所有才需要try catch。如果你的方法体声明成: public static void main(String args[])throws FileNotFoundException..这样就不用try catch了
------解决方案--------------------