Java : Programming Concept Questions & Answers
Question : What is garbage collection in the context of Java?
A.
Java deletes all unused java files on the
system.
B.
Memory used by the object with no reference is automatically reclaimed.
C.
The JVM cleans output of
Java program with error.
D.
Any unused package in a program automatically gets deleted.
Correct Answer is : Option B.
- Which one is a template for creating different objects ?
- Which symbol is used to contain the values of automatically initialized arrays?
- Which one is true about a constructor ?
- Which of these operators is used to allocate memory to array variable in Java?
- Which of these is not a bitwise operator?