Page 1 of 1

Multi-catch syntax

Posted: Fri May 29, 2020 4:58 am
by saregg

Code: Select all

public class Test
   { 
     private static String s ; 
     public static void main(String[] args) 
          { 
          try{ 
             	System. out .println( s .length()); 
             }
           catch (NullPointerException | RuntimeException ex) { 
           		System. out .println( "DONE" ); 
           	} 
           } 
   }
Are these in for JAVA SE-11 lvl-1 exam ? give a brief about this

Re: Multi-catch syntax

Posted: Fri May 29, 2020 5:14 am
by admin
No, multi-catch is not on OCP Java 11 Part 1 1z0-815 exam.