General Motors (GM) interview question

How to create a simple deadlock program using java