Question PRG-JAVA-0073
HardWhat is the difference between synchronized methods and ReentrantLock?
- A.
ReentrantLock can't be reentered
- B.
synchronized is faster in every case
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
What is the difference between synchronized methods and ReentrantLock?
ReentrantLock can't be reentered
synchronized is faster in every case
Sign up free to see the answer and a step-by-step explanation.
They are identical
ReentrantLock offers tryLock, timeouts, fairness and multiple conditions; synchronized is simpler and released automatically