in Education by
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 This question was posed to me in an interview for internship. My query is from Coding best practices topic in portion Autoboxing & Miscellaneous of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
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.

Related questions

0 votes
    When does a memory leak happen? (a) Browser doesn't release memory from objects unnecessary (b) Browser ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    When does a cycle occur during memory leak? (a) No reference occurs (b) Two objects reference (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    What is the central concept of JavaScript memory management? (a) Reliability (b) Reachability (c) Efficiency ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Where are memory leaks found? (a) Client side objects (b) Server side objects (c) Both Client ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    How many properties are available in a memory object? (a) 1 (b) 2 (c) 3 (d) 4 The ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    What is the function of the memory object? (a) Gets unused memory details (b) Shows optimization (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    What can be done to monitor the memory usage? (a) Profiling (b) Sequencing (c) Serializing (d) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which one of the following contains date information? (a) java.sql.TimeStamp (b) java.sql.Time (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
     request is instance of which one of the following classes? (a) Request (b) HttpRequest (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which one of the following is correct for directive in JSP? (a) (b) (c) (d) This question was ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which one of the following annotations is not used in Hibernate? (a) @Entity (b) @Column (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which one of the following is not an annotation used by Junit with Junit4? (a) @Test (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...