Datasets:

ArXiv:
License:
File size: 379 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public class FinallyBlockDemo {
    public static void main(String[] args) {
        int a = 45;
        int b = 0;
        int rs = 0;
        try {
            rs = a / b;
        } catch (ArithmeticException Ex) {
            System.out.print("\n\tError : " + Ex.getMessage());
        } finally {
            System.out.print("\n\tThe result is : " + rs);
        }
    }

}