A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

What is output of the program?

program for MultiCatch

Program For MultiCatch





class Three
{
   public static void main(String args[])
   {
      try
      {
         int n=Integer.parseInt(args[0]);

         int m=Integer.parseInt(args[1]);

         System.out.println(n/m);

      }

      catch(ArithmeticException e)
      {
         System.out.println(e);
      }

      catch(NumberFormatException e)
      {
         System.out.println(e);
      }

      catch(RuntimeException e)
      {
         System.out.println("rte");

         System.out.println(e);
      }

      System.out.println("Shree Krishna");

   }
 }

output


 

LEARN TUTORIALS

.

.