Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is multi-catch block in java?

Category: Java

Java 7 one of the improvement was multi-catch block where we can catch multiple exceptions in a single catch block. This makes are code shorter and cleaner when every catch block has similar code.
If a catch block handles multiple exception, you can separate them using a pipe (|) and in this case exception parameter (ex) is final, so you can’t change it

Leave a Reply

Your email address will not be published. Required fields are marked *