throws IOException什么意思?public class Abs{public static void main(String arges[ ])throws IOException{int x=-4;if (x

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/10 18:00:07
throws IOException什么意思?public class Abs{public static void main(String arges[ ])throws IOException{int x=-4;if (x
xŒN@_e0l܉.\pi\KӎZÆD. ^!5^@!P¡cJ1&n\M?'S0FO4AJQqdƯו@D4 lwAdqT${v*! 1I@_[^YGTov1n! 7;W{7``E&gԚ 02iOJ*1VݥW%h|Q^VS P c>zbyѥȚ=q*

throws IOException什么意思?public class Abs{public static void main(String arges[ ])throws IOException{int x=-4;if (x
throws IOException什么意思?
public class Abs
{
public static void main(String arges[ ])throws IOException
{
int x=-4;
if (x

throws IOException什么意思?public class Abs{public static void main(String arges[ ])throws IOException{int x=-4;if (x
可以去掉throws IOException 因为主方法里
没有会导致IOException的语句吧
throws IOException 不是跟try catch一起用的
当方法里一个语句产生了IOException
如果你用的try catch 那么这个异常是在这个方法中被捕获
如果 你用的throws IOException 那么可以不写try catch语句
这个异常被抛到方法外 在这个方法外被捕获