send(String message) { messages[received++] = message; if (received == messages.length) { System.out.println("mailbox: notification sent to tell main that mailbox is full"); notify(); } }
synchronized void send(String message) { messages[received++] = message; if (received == messages.length) { System.out.println("mailbox: notification sent to tell main that mailbox is full"); notify(); } }
   send(String message)      {      messages[received++] = message;      if (received == messages.length)         {         System.out.println("mailbox: notification sent to tell main that mailbox is full");         notify();         }      }