how can i catch 2 or more exception in same time ? Should i use trycatch-block for each all issue ?
For example, i couldn t catch b.charAt() to "Null Pointer Exception" after arithmeticException.
try{
int a = 6 / 0 ;
String b = null;
System.out.println(b.charAt(0));
}
catch(NullPointerException e){
System.out.println("Null Pointer Exception");
}
catch(ArithmeticException e){
System.out.println("Aritmetic Exception ");
}