Which keyword when applied on a method indicates that only one thread should execute the method at a time.
A.volatile
B.synchronized
C.native
D.static
Answers
Answered by
5
heya !
your answer is option B "synchronized "
synchronized keyword when applied on a method indicates that only one thread should execute the method at a time.
hope this helps you
your answer is option B "synchronized "
synchronized keyword when applied on a method indicates that only one thread should execute the method at a time.
hope this helps you
Answered by
0
Synchronized keyword is implemented in a method indicates that only one thread need to execute the approach at a time.
Explanation:
- Synchronization is a modifier this is used for the approach and blocks most effective.
- With the assist of a synchronized modifier, we are able to restrict a shared useful resource to be accessed most effective with the aid of using one thread.
- A mutex is a collectively special synchronization object.
- This means it could be obtained with the aid of using one and only one thread at a time.
- The mutex is designed for the ones conditions wherein a shared useful resource may be used by only one thread at a time.
Synchronized is the correct option.
Similar questions
Math,
7 months ago
Science,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Chemistry,
1 year ago