أمامكم الكود التالي :
public class Test {
public static void main (String [] args ) {
try {
int a, b;
System.out.println(a/b);
}
catch (Exception e) {
System.out.println("there was an error");
}
finally {
System.out.println("there was no error");
}
}
}ماذا سوف يكون ال output إذا :
كان a =0
وماذا سوف يكون إذا:
كان b=0