ServiceNow interview question

write JAVA code to create a deadlock.