Java Basics
3 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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?

  • ! (correct)
  • &
  • ^
  • |
  • 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
  • Use Quizgecko on...
    Browser
    Browser