posted 9 years ago
Below code snippet compiles and print 2.
I've 2 questions.
1. Should not getArray() method throw compilation error as it's return type is int[], but returning null
2. Why does system.out.println after catch block execute as try throws java.lang.NullPointerException