Saved Bookmarks
| 1. |
Consider this function:class Accounts {int balance [100];void deposit_salary(int emp_id, int sal) {balance[emp_id] += sal;}// assume that constructors and other methods of the Accounts// class have reasonable definitions. Assume that this is// written in a language that allows methods of a class// to be optionally defined as 'synchronized (in which case no two// thnandaIn your opinion, which of the following statements is true (select the best choice):Select the closest optionO The deposit_salary method must always be synchronizedThe deposit_salary method must be synchronized only if it will be used simultaneously bymultiple threads in the same programThe deposit_salary method must be synchronized if it is possible that it can be called at thesame time but in by different single-threaded programs, on the same computer.There is no need for the deposit_salary method to be synchronizedO None of the aboveSubmit |
|
Answer» भाई मैं कह रहा हूं कि मैं इस क्लास में नहीं हूं और पैसे भी यह कौन सा क्लास का है |
|