Mutilpe catch block in java using (|)

If we have multiple catch blocks for a try block we can even catch both exceptions in one catch block using | symbol. Please note this (|)feature for catch block is only available since java 7.

 try { }

 //So instead of this 
/* catch(NoSuchElementException e ){
        System.out.println(e.toString());
     }
     catch (ArithmeticException e){
        System.out.println(e.toString());
    }*/
    //We can do this 
    catch(NoSuchElementException |ArithmeticException e){
       System.out.println(e.toString());
    }