Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-819 Topic 7 Question 92 Discussion

Actual exam question for Oracle's 1Z0-819 exam
Question #: 92
Topic #: 7
[All 1Z0-819 Questions]

Given:

Which make class thread safe?

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

Osvaldo
2 months ago
I'm going with C. Synchronizing the 'foo' method seems like the most logical way to make the entire class thread-safe.
upvoted 0 times
Nana
1 months ago
User3: Yeah, synchronizing foo seems like the best option here.
upvoted 0 times
...
Amina
1 months ago
User2: I agree, that would make the class thread-safe.
upvoted 0 times
...
Hoa
1 months ago
User1: I think making foo synchronized is the way to go.
upvoted 0 times
...
...
Vincenza
2 months ago
I'm not sure, but I think making setB synchronized could also make the class thread safe.
upvoted 0 times
...
Staci
2 months ago
I agree with Novella, because both foo and sets need to be synchronized to make the class thread safe.
upvoted 0 times
...
Clay
2 months ago
Haha, I bet the correct answer involves the word 'synchronized' in some way. That's the go-to solution for threading issues!
upvoted 0 times
...
Latonia
3 months ago
D can't be right, since the question says 'which make class thread safe?' not 'which class is thread safe?'
upvoted 0 times
Nickie
2 months ago
C) Make foo synchronized.
upvoted 0 times
...
Tashia
2 months ago
B) Make setB synchronized.
upvoted 0 times
...
Rachael
2 months ago
A) Make foo and sets synchronized.
upvoted 0 times
...
...
Novella
3 months ago
I think the answer is A) Make foo and sets synchronized.
upvoted 0 times
...
Colton
3 months ago
I think the answer is C. Making the 'foo' method synchronized will make the entire class thread-safe.
upvoted 0 times
Heidy
2 months ago
Got it, thanks for clarifying.
upvoted 0 times
...
Rolf
2 months ago
I think that's not necessary, 'foo' is the critical section.
upvoted 0 times
...
Ceola
2 months ago
But what about making setB synchronized?
upvoted 0 times
...
Alease
2 months ago
Agreed, making 'foo' synchronized will ensure thread safety.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77