Where are the local variables of a running Java method held?
Correct answer B. In a frame on the JVM stack of the thread
Subject / 929 questions
Page 13 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 13 of 47
Correct answer B. In a frame on the JVM stack of the thread
Correct answer B. StackOverflowError
Correct answer D. When no live thread can reach it through references
Correct answer A. Only that it suggests the JVM should try to reclaim memory
Correct answer A. Both are eligible for garbage collection
Correct answer D. Exactly one
Correct answer C. java.util.function
Correct answer B. It must be final or effectively final
Correct answer B. 20
Correct answer B. Nothing
Correct answer A. The second count throws an IllegalStateException
Correct answer A. record
Correct answer C. p.x()
Correct answer C. As the declared type of a field
Correct answer A. The classes allowed to directly extend it
Correct answer A. An additional instance field
Correct answer C. Transport layer
Correct answer C. Frame
Correct answer B. Four
Correct answer A. The intrinsic lock of the object it is called on