Synchronization

We explained what was causing the race condition discovered in the previous lecture. We introduced synchronized methods and used them to avoid race conditions. We introduced the wait and notifyAll methods and demonstrated their use in implementing a bounded buffer.