exam questions

Exam 1z0-809 All Questions

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

Exam 1z0-809 topic 1 question 152 discussion

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

Which two statements are true about synchronization and locks? (Choose two.)

  • A. A thread automatically acquires the intrinsic lock on a synchronized statement when executed.
  • B. The intrinsic lock will be retained by a thread if return from a synchronized method is caused by an uncaught exception.
  • C. A thread exclusively owns the intrinsic lock of an object between the time it acquires the lock and the time it releases it.
  • D. A thread automatically acquires the intrinsic lock on a synchronized method's object when entering that method.
  • E. Threads cannot acquire intrinsic locks on classes.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️
Reference:
https://docs.oracle.com/javase/tutorial/essential/concurrency/locksync.html

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
6c84cb9
4 months, 3 weeks ago
the correct answers are C and D.
upvoted 1 times
...
steefaand
11 months, 4 weeks ago
Selected Answer: CD
C and D should be correct.
upvoted 1 times
...
duydn
1 year, 4 months ago
Selected Answer: AD
A & D are correct
upvoted 1 times
...
Svetleto13
3 years, 9 months ago
C and D are correct
upvoted 2 times
...
laura_lu93
3 years, 10 months ago
C and D are correct! A is wrong. -> synchronized statement won’t acquires “intrinsic lock” but a specified object that provides the intrinsic lock B is wrong -> The lock release occurs even if the return was caused by an uncaught exception.
upvoted 4 times
...
laura_lu93
3 years, 10 months ago
C and D are correct! A is wrong. -> synchronized statement won’t acquires “intrinsic lock” but a specified object that provides the intrinsic lock B is wrong -> The lock release occurs even if the return was caused by an uncaught exception.
upvoted 3 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