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](/uploads/image/z/12996440-8-0.jpg?t=throws+IOException%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D%3Fpublic+class+Abs%7Bpublic+static+void+main%28String+arges%5B+%5D%29throws+IOException%7Bint+x%3D-4%3Bif+%28x)
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
Pc>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语句
这个异常被抛到方法外 在这个方法外被捕获