Search your topic here

program in Java to implement exception handling

PRINCIPLES OF PROGRAMING LANGUAGES
PRACT. Write a program in Java to implement exception handling. 

public class JavaExceptionExample{
  public static void main(String args[])
  {
   int a = 10;
   try
   {
      int z= a/0;
   }

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

LEAVE A REPLY










Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.