1Z0-811 Java Basics and Syntax Practice Question
Which TWO keywords are used to control access to class members? (Choose two.)
⚠ Common exam trap
Oracle often tests the distinction between access modifiers (private, public) and non-access modifiers (static, abstract, final), so the trap here is that candidates confuse keywords that affect behavior or structure with those that control visibility and access to class members.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
private
The `private` keyword restricts access to the class member so that it can only be accessed within the same class. Option C is correct because the `public` keyword allows access to the class member from any other class in any package. These are two of the four access modifiers in Java (private, default, protected, public) that directly control visibility and access to class members.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
private
Why this is correct
Correct: private restricts access to within the class.
- ✗
static
Why it's wrong here
static is for class-level, not access control.
- ✓
public
Why this is correct
Correct: public grants access from anywhere.
- ✗
abstract
Why it's wrong here
abstract indicates incomplete implementation.
- ✗
final
Why it's wrong here
final prevents modification, not access.
Go deeper
Related to this question
About these practice questions
One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.