Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which method can NOT be called directly in Java?

  1. main()

  2. finalize()

  3. System.gc()

  4. private methods of the same class

The correct answer is: finalize()

Finalize() is the only option that cannot be called directly in Java. This is because finalize() is used by the garbage collector to free up memory resources and cannot be called explicitly in the code. All other methods, including main(), System.gc(), and private methods of the same class, can be called directly in Java.