previous | start | next

Synchronized Methods

public class BankAccount
{
   public synchronized void deposit(double amount)
   {
      . . .
   }

   public synchronized void withdraw(double amount)
   {
      . . .
   }
   . . .
}


previous | start | next