gs gs128 Java Classes Methods - Java Heap and Garbage Collection - Quiz No.1
gs gs128 Java Quiz
This quiz belongs to book/course code gs gs128 Java of gs organization. We have 136 quizzes available related to the book/course Java. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Java Classes Methods. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Which of the following has the highest memory requirement?
Heap
Stack
JVM
Class
Question 2: Where is a new object allocated memory?
Young space
Old space
Young or Old space depending on space availability
JVM
Question 3: Which of the following is a garbage collection technique?
Cleanup model
Mark and sweep model
Space management model
Sweep model
Question 4: What is -Xms and -Xmx while starting jvm?
Initial; Maximum memory
Maximum; Initial memory
Maximum memory
Initial memory
Question 5: Which exception is thrown when java is out of memory?
MemoryFullException
MemoryOutOfBoundsException
OutOfMemoryError
MemoryError
Question 6: How to get prints of shared object memory maps or heap memory maps for a given process?
jmap
memorymap
memorypath
jvmmap
Question 7: What happens to the thread when garbage collection kicks off?
The thread continues its operation
Garbage collection cannot happen until the thread is running
The thread is paused while garbage collection runs
The thread and garbage collection do not interfere with each other
Question 8: Which of the below is not a Java Profiler?
JVM
JConsole
JProfiler
Eclipse Profiler
Question 9: Which of the below is not a memory leak solution?
Code changes
JVM parameter tuning
Process restart
GC parameter tuning