IBM Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: In-Person
your java code has syntax errors but i agree with Manoj that you need a while loop or some kind of notify when queue resouces are available again. the error that they gave you should be a clue that the if statement is not looping to check if queue has some resources again.
Move mre.set(); into the lock block
- Tony November 26, 2013