Examlex

Solved

Assume Three Threads Share a BankAccount Object with a Balance

question 75

Multiple Choice

Assume three threads share a BankAccount object with a balance initially zero (0) , a ReentrantLock named myLock, and a condition object on myLock named insufficientFunds, as shown below.Thread one calls withdraw(30) , then thread two calls withdraw(20) and thread three calls deposit(45) .What is the balance after the three calls? Assume three threads share a BankAccount object with a balance initially zero (0) , a ReentrantLock named myLock, and a condition object on myLock named insufficientFunds, as shown below.Thread one calls withdraw(30) , then thread two calls withdraw(20)  and thread three calls deposit(45) .What is the balance after the three calls?    A) 0 B) 15 or 25 C) 45 D) -5


Definitions:

Equilibrium Price

The price at which the quantity of a good or service demanded equals the quantity supplied, resulting in market balance.

Demand

The willingness and ability of consumers to purchase goods or services at a given price level.

Supply

The complete quantity of a product or service that can be bought at a particular price point.

Price Floor

A legally established minimum price for a good, or service. Normally set at a price above the equilibrium price.

Related Questions