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 keyword makes a class member available to everyone?

  1. private

  2. protected

  3. public

  4. package

The correct answer is: public

The correct keyword to make a class member accessible to everyone is "public". Private variables can only be accessed within the same class, while protected variables can only be accessed within the same package or through inheritance. The keyword "package" is not used to define accessibility but instead specifies the package in which the class is defined.