1.

Which one of the following causes memory leak?(a) Release database connection when querying is complete(b) Use Finally block as much as possible(c) Release instances stored in static tables(d) Not using Finally block often

Answer» Correct option is (d) Not using Finally block often

To explain I would say: Finally block is called in successful as well exception scenarios. Hence, all the connections are closed properly which avoids memory leak.


Discussion

No Comment Found

Related InterviewSolutions