Multiple choice technology platforms and products

What will happen to the Exception object after exception handling?

  1. It will go for Garbage Collector

  2. It remains in Stack

  3. It will not create any object

  4. Exception objects will not put load on JVM

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

After an exception is handled and no references to the exception object remain, it becomes eligible for garbage collection like any other dereferenced Java object. It does not remain permanently on the stack.