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

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

Mastering Java: The Ultimate Quiz for 'Thinking in Java'. Dive deep into Java with multiple-choice questions. Challenge yourself with quiz questions designed to test and improve your understanding of the 'Thinking in Java' book. Get ready for your exam!

Practice this question and more.


What is package access also known as?

  1. Private access

  2. Protected access

  3. Public access

  4. Friendly access

The correct answer is: Friendly access

Package access, also known as friendly access, grants access to members within the same package. The other options are incorrect because A) Private access only allows access to members within the same class. B) Protected access allows access to members within the same package and any subclasses, not just members within the same package. C) Public access allows access to all classes and packages.