Mastering Java 2025 – 400 Free Practice Questions to Pass the 'Thinking in Java' Exam

Question: 1 / 510

Which keyword makes a class member available to everyone?

private

protected

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.

Get further explanation with Examzify DeepDiveBeta

package

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy