public class Flags2 { private boolean isReady = false; public (1) Place here void produce() { isReady = true; (2)Place here } public (3)Place here void consume() { while (! isReady) { try { (4)Place here } catch (Exception ex) { } } isReady = (5)Place here } }