main() {
int x = 12;
int y = 0;
int res;
try {
res = x ~/ y;
}
on IntegerDivisionByZeroException {
print('Cannot divide by zero');
}
finally {
print('Finally block executed');
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266228.html