Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- class Test{ //error: Test.java:10: error: unreported exception IllegalAccessException; must be caught or declared to be thrown in met();
- public static void met ()throws IllegalAccessException{
- try{
- throw new IllegalAccessException("demo");
- }
- catch(ArithmeticException e){
- System.out.println(" arithmetic ");
- }
- }
- public static void main(String args[]){
- met();
- }
- }
- */
- /*
- class Test{ //error : unreported exception IllegalAccessException; must be caught or declared to be thrown in met();
- public static void met ()throws IllegalAccessException{
- throw new IllegalAccessException("demo");
- }
- public static void main(String args[]){
- try{
- met();
- }
- finally{
- System.out.println(" arithmetic ");
- }
- }
- }
- */
Add Comment
Please, Sign In to add comment