Barclays Interview Question

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