employer cover photo
employer logo
employer logo

Hortonworks

Acquired by Cloudera

Is this your company?

Hortonworks interview question

Write a program to create a deadlock scenario?

Interview Answer

Anonymous

Jul 8, 2018

Wrote a program with two locks and two threads. First thread waits for the second thread to release the first lock. Second thread waits for the first thread to release second lock. Both thread are executing a common critical area code with nested synchronized blocks.