Barclays interview question

Explain producer consumer problem and how would you go about it in Java using multi threading.