Podcast
Questions and Answers
What is the purpose of Garbage Collection in Java?
What is the purpose of Garbage Collection in Java?
- To enable multithreading in Java programs
- To free up memory occupied by objects that are no longer in use (correct)
- To prevent memory leaks in Java programs
- To optimize the performance of Java programs
Which of the following is NOT a bitwise operator in Java?
Which of the following is NOT a bitwise operator in Java?
- ! (correct)
- &
- ^
- |
What is the purpose of the 'final' keyword in Java?
What is the purpose of the 'final' keyword in Java?
- All of the above (correct)
- To prevent a class from being subclassed
- To prevent a variable from being reassigned
- To prevent a method from being overridden