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.


What cannot access a class member with package access?

  1. Classes in the same package

  2. Classes in a different package

  3. Subclasses in the same package

  4. Subclasses in a different package

The correct answer is: Classes in a different package

Package access, also known as the default access, allows only classes within the same package to access a class member. This means that classes in a different package, including subclasses, cannot access the class member. While subclasses in the same package do have access, they are not the only option, making A and C incorrect. B is the only choice that accurately describes what cannot access a class member with package access.