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 access level does a class member have if no access specifier is provided?

  1. Private

  2. Protected

  3. Public

  4. Package access

The correct answer is: Package access

Without an access specifier, a class member would have package access. This means that the member can be accessed by classes within the same package, but not by classes outside of that package. Options A, B, and C refer to specific access specifiers in Java and are therefore incorrect. Option C, public, would give all classes access to the member, while options A and B would limit the access to the class within which the member is declared or inherited classes. Package access is the default access level in Java if no access specifier is provided.