ariestamirra

per7

May 22nd, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package Percobaan;
  2.  
  3. import java.io.FileNotFoundException;
  4.  
  5. public class Percobaan7 {
  6.  
  7.     public static void method1() throws FileNotFoundException {
  8.         throw new FileNotFoundException("File Tidak Ada");
  9.     }
  10.  
  11.     public static void main(String[] args) {
  12.         try {
  13.             method1();
  14.         } catch (FileNotFoundException ex) {
  15.             System.out.println(ex.getMessage());
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment