1Z0-829 Java I/O API and Securing Applications Practice Question
Exhibit
Policy file snippet:
grant codeBase "file:/home/user/app/-" {
permission java.io.FilePermission "/data/-", "read,write";
permission java.net.SocketPermission "*", "connect";
};Refer to the exhibit. Which of the following best describes the effective permissions granted to the application?
⚠ Common exam trap
Oracle often tests the distinction between file permission actions (read vs. write) and the wildcard syntax (`-` for recursive, `*` for all files in a directory), leading candidates to misread the granted actions or scope.
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
✓
The application can read and write files under /data/ and connect to any socket.
The exhibit shows a Java security policy granting the application `java.net.SocketPermission` with `connect,resolve` actions and `java.io.FilePermission` with `read,write` actions on `/data/-`. This means the application can connect to any socket (since the target name is `*`) and read/write any file under `/data/`. Option B correctly captures both permissions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The application can connect to any network socket.
Why it's wrong here
True but incomplete; it also has file permission.
- ✓
The application can read and write files under /data/ and connect to any socket.
Why this is correct
Both permissions are granted by the policy.
- ✗
The application can only read files under /data/ and connect to sockets.
Why it's wrong here
Write is also granted, not just read.
- ✗
The application can read and write any file under /data/.
Why it's wrong here
True but incomplete; it also has socket permission.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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-829 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-829 exam.