Computer Science, asked by DHANESHREE6335, 1 year ago

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 StarGazer001
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
Answered by mariospartan
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