Advertisement
JeffGrigg

Untitled

Nov 2nd, 2020
3,013
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.47 KB | None | 0 0
  1. package com.Practice;
  2.  
  3. public class EH_TestCases {
  4.  
  5.     public static void main(String[] args) {
  6.         System.out.println(ml());
  7.     }
  8.  
  9.     private static int ml() {
  10.         try {
  11.             System.out.println("In Try");
  12.             System.out.println(10/0);
  13.         } catch (NullPointerException npe) {
  14.             System.out.println("In catch");
  15.         } finally {
  16.             System.out.println("In finally");
  17.             return 30;
  18.         }
  19.     }
  20.    
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement