Home » JAVA Programming » Java Basic » Question
  1. Which one of the following causes memory leak?
    1. Release instances stored in static tables
    2. Release database connection when querying is complete
    3. Not using Finally block often
    4. Use Finally block as much as possible
    5. None of these
Correct Option: C

Finally block is called in successful as well exception scenarios. Hence, all the connections are closed properly which avoids memory leak.



Your comments will be displayed only after manual approval.