Back
I know there is no way to find out which exceptions a method throws without looking up the API docs one-by-one. So, I would like to ask you which are the most common Exceptions and runtime exceptions you have come across when dealing with:
Casting
Arrays
Vector, ArrayList, HashMap, etc.
IO
Object Serialization
Threads
Assume that the below things belongs to java.lang unless I specify otherwise:
Casting: ClassCastException
Arrays: ArrayIndexOutOfBoundsException, NullPointerException
Collections: NullPointerException, ClassCastException
IO: java.io.IOException, java.io.FileNotFoundException, java.io.EOFException
Seralization: java.io.ObjectStreamException
Threads: InterruptedException, SecurityException, IllegalThreadStateException
Want to learn Java? Check out the Java certification from Intellipaat.
31k questions
32.8k answers
501 comments
693 users