Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
Explain Which one of the following causes memory leak?
Home
Education
Explain Which one of the following causes memory...
asked
Feb 23, 2022
in
Education
by
JackTerrance
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
java
autoboxing
1
Answer
0
votes
answered
Feb 23, 2022
by
JackTerrance
Best 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.
Related questions
0
votes
Q: Explain How to copy the file from one location to other?
How to copy the file from one location to other? (a) Files.copy(source, target) (b) Path.copy(source, ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain How to read entire file in one line using java 8?
How to read entire file in one line using java 8? (a) Files.readAllLines() (b) Files.read() (c) ... Autoboxing & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is not introduced with Java 8?
Which of the following is not introduced with Java 8? (a) Stream API (b) Serialization (c) Spliterator (d) ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is not a core interface of Hibernate?
Which of the following is not a core interface of Hibernate? (a) Configuration (b) Criteria (c) ... Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following methods returns proxy object?
Which of the following methods returns proxy object? (a) loadDatabase() (b) getDatabase() (c) load() (d) ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following methods hits database always?
Which of the following methods hits database always? (a) load() (b) loadDatabase() (c) getDatabase() (d) ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following method is used inside session only?
Which of the following method is used inside session only? (a) merge() (b) update() (c) end() (d ... Autoboxing & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is not a state of object in Hibernate?
Which of the following is not a state of object in Hibernate? (a) Attached() (b) Detached() (c) ... Autoboxing & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is not an inheritance mapping strategies?
Which of the following is not an inheritance mapping strategies? (a) Table per hierarchy (b) Table per ... Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is not an advantage of using Hibernate Query Language?
Which of the following is not an advantage of using Hibernate Query Language? (a) Database independent (b) ... Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the following is a best practice to measure time taken by a process for execution?
Which of the following is a best practice to measure time taken by a process for execution? (a) System. ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain JUnits are used for which type of testing?
JUnits are used for which type of testing? (a) Unit Testing (b) Integration Testing (c) System Testing (d) ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the below statement about JUnit is false?
Which of the below statement about JUnit is false? (a) It is an open source framework (b) It provides an ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of the below is an incorrect annotation with respect to JUnits?
Which of the below is an incorrect annotation with respect to JUnits? (a) @Test (b) @BeforeClass (c) @Junit ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
0
votes
Q: Explain Which of these is not a mocking framework?
Which of these is not a mocking framework? (a) EasyMock (b) Mockito (c) PowerMock (d) MockJava I had ... & Miscellaneous of Java Select the correct answer from above options...
asked
Feb 23, 2022
in
Education
by
JackTerrance
java
autoboxing
...