Java Quiz 13 : Classes & Methods IV By Tejas Chaudhari - September 2, 2021 FacebookTwitterPinterestWhatsApp Welcome to your Java Quiz 13 : Classes & Methods IV 1. Which of the following has the highest memory requirement?a) Heapb) Stackc) JVMd) Class 2. Where is a new object allocated memory?a) Young spaceb) Old spacec) Young or Old space depending on space availabilityd) JVM 3. Which of the following is a garbage collection technique?a) Cleanup modelb) Mark and sweep modelc) Space management modeld) Sweep model 4. What is -Xms and -Xmx while starting jvm?a) Initial; Maximum memoryb) Maximum; Initial memoryc) Maximum memoryd) Initial memory 5. Which exception is thrown when java is out of memory?a) MemoryFullExceptionb) MemoryOutOfBoundsExceptionc) OutOfMemoryErrord) MemoryError 6. How to get prints of shared object memory maps or heap memory maps for a given process?a) jmapb) memorymapc) memorypathd) jvmmap 7. What happens to the thread when garbage collection kicks off?a) The thread continues its operationb) Garbage collection cannot happen until the thread is runningc) The thread is paused while garbage collection runsd) The thread and garbage collection do not interfere with each other 8. Which of the below is not a Java Profiler?a) JVMb) JConsolec) JProfilerd) Eclipse Profiler 9. Which of the below is not a memory leak solution?a) Code changesb) JVM parameter tuningc) Process restartd) GC parameter tuning 10. Garbage Collection can be controlled by a program?a) Trueb) False 11. What is the process of defining two or more methods within same class that have same name but different parameters declaration?a) method overloadingb) method overridingc) method hidingd) none of the mentioned 12. Which of these can be overloaded?a) Methodsb) Constructorsc) All of the mentionedd) None of the mentioned 13. What is the process of defining a method in terms of itself, that is a method that calls itself?a) Polymorphismb) Abstractionc) Encapsulationd) Recursion 14. What is the process by which we can control what parts of a program can access the members of a class?a) Polymorphismb) Abstractionc) Encapsulationd) Recursion 15. Which of the following statements are incorrect?a) public members of class can be accessed by any code in the programb) private members of class can only be accessed by other members of the classc) private members of class can be inherited by a subclass, and become protected members in subclassd) protected members of a class can be inherited by a subclass, and become private members of the subclass Time is Up!