exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 109 discussion

Actual exam question from Oracle's 1z0-819
Question #: 109
Topic #: 1
[All 1z0-819 Questions]

Given:



To secure this code, you want to make sure that the client code cannot modify the public static fields.

Which code will accomplish this?

  • A.
  • B.
  • C.
  • D.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
TheOneAboveAll
3 months ago
Selected Answer: C
interface -> variable final static
upvoted 1 times
...
Stavok
5 months, 3 weeks ago
Selected Answer: C
The correct answer is C. By defining the fields in an interface, you can make sure that the client code cannot modify them. In an interface, all fields are implicitly public, static, and final, so their values cannot be changed once they are initialized.
upvoted 2 times
...
KiraguJohn
6 months, 1 week ago
C In Java, interface variables are implicitly considered as constants and are therefore effectively final. By default, all variables declared in an interface are implicitly marked as public, static, and final, regardless of whether the public, static, or final modifiers are explicitly specified.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago