using try catch causing errors; : <pre><code>import java.util.Scanner;
import java.util.InputMismatchException;



public class divide {
    public static void main(String[] args) {
        Scanner kb = new Scanner (System.in);
        int a,b;

        try{
            System.out.println("enter 2 number ");
            a = kb.nextInt();
            b = kb.nextInt();
            int c = a/b;
            System.out.println("div="+c);

        }
        catch(ArithmeticException e)
        {
            System.out.println("please enter non 0 in deno");
        }
        catch (InputMismatchException e2)
        {
            System.out.println("please input int only");
            System.exit(0);

        }
        int d= a+b;
        System.out.println("sum="+d);
    }
}
</code></pre>

<p>error </p>

<p>divide.java:38: error: variable a might not have been initialized
        int d= a+b;
               ^
divide.java:38: error: variable b might not have been initialized
        int d= a+b;</p>
