Campbell Ritchie wrote:Welcome to JavaRanch
Whether an Exception is checked or unchecked depends on its inheritance. So every Exception class has an inheritance tree attached, which the compiler can follow.
I just want to know the process . When an exception occurs then an instance is thrown from that point. Now the question is how an instance can be created at compile time, instance can be created only at runtime. Compiler does not know what type of exception it just take that instance and then find out the its type using reflection then print the stack's trace on console.
I referred also jsl 1, 2 and 3 but I could not get it how it is actually done at compile time.