Comcast interview question

Code Producer Consumer problem in java