Here is a confusing question – what does the next code prints?
public static void doStam() { try { doExcption(); return; } finally { System.out.println("Finally"); } } public static void main(String[] args) { doStam(); } public static void doExcption() { String [] stam = new String[0]; //purpose exception stam[1].toString(); }
Answer:
Finally
Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: …