异常问题请教
mport java.io.*;
public class Helloworld {
public static void main(String[] args)throws IOException{
System.out.println("请输入字符串:");
int s=System.in.read( );
System.out.println("你所输入的字符串为:"+s);
}
}
为什么已经申明了throws IOException,而在函数内部没有throw IOException,然而在有的函数throws后在函数内部却又throw了。有throw跟没有throw究竟有什么区别??