494). Which of the following is not a segment of memory in java?
[A]Stack Segment
[B]Heap Segment
[C]Code Segment
[D]Register Segment
Show Answer
Correct Answer: Register Segment
Notes:
Answer: d
Explanation: There are only 3 types of memory segment. Stack Segment, Heap Segment and Code Segment.
495). Does code Segment loads the java code?
[A]True
[B]False
[C]none
[D]none
Show Answer
Correct Answer: True
Notes:
Answer: a
Explanation: Code Segment loads compiled java bytecode. Bytecode is platform independent.
496). What is JVM?
[A]Bootstrap
[B]Interpreter
[C]Extension
[D]Compiler
Show Answer
Correct Answer: Interpreter
Notes:
Answer: b
Explanation: JVM is Interpreter. It reads .class files which is the byte code generated by compiler line by line and converts it into native OS code.
497). Which one of the following is a class loader?
[A]Bootstrap
[B]Compiler
[C]Heap
[D]Interpreter
Show Answer
Correct Answer: Bootstrap
Notes:
Answer: a
Explanation: Bootstrap is a class loader. It loads the classes into memory.
498). Which class loader loads jar files from JDK directory?
[A]Bootstrap
[B]Extension
[C]System
[D]Heap
Show Answer
Correct Answer: Extension
Notes:
Answer: b
Explanation: Extension loads jar files from lib/ext directory of the JRE. This gives the basic functionality available.
499). Which of the following is not a memory classification in java?
[A]Young
[B]Old
[C]Permanent
[D]Temporary
Show Answer
Correct Answer: Temporary
Notes:
Answer: d
Explanation: Young generation is further classified into Eden space and Survivor space. Old generation is also the tenured space. The permanent generation is the non heap space.
500). What is the Java 8 update of PermGen?
[A]Code Cache
[B]Tenured Space
[C]Metaspace
[D]Eden space
Show Answer
Correct Answer: Metaspace
Notes:
Answer: c
Explanation: Metaspace is the replacement of PermGen in Java 8. It is very similar to PermGen except that it resizes itself dynamically. Thus, it is unbounded.
501). Classes and Methods are stored in which space?
[A]Eden space
[B] Survivor space
[C]Tenured space
[D]Permanent space
Show Answer
Correct Answer: Permanent space
Notes:
Answer: d
Explanation: The permanent generation holds objects which JVM finds convenient to have the garbage collector. Objects describing classes and methods, as well as the classes and methods themselves, are a part of Permanent generation.
502). Where is String Pool stored?
[A]Java Stack
[B]Java Heap
[C]Permanent Generation
[D]Metaspace
Show Answer
Correct Answer: Java Heap
Notes:
Answer: b
Explanation: When a string is created; if the string already exists in the pool, the reference of the existing string will be returned, else a new object is created and its reference is returned.
503). The same import package/class be called twice in java?
[A]True
[B]False
[C]none
[D]none
Show Answer
Correct Answer: True
Notes:
Answer: a
Explanation: We can import the same package or same class multiple times. Neither compiler nor JVM complains will complain about it. JVM will internally load the class only once no matter how many times we import the same class or package.