Java Exception Handling (Try-catch)

  • + 1 comment

    can't it be possible that , we print the required output by using the object of exception we passed in the catch block .

    Ex :

    try {

    }catch(InputMismatchException i) { System.out.println(i); }

    above program print Exception with the causal , but the required output is without causal ?