Pergunta de entrevista da empresa Cognizant

Producer consumer problem, Java concepts