DEVFYI - Developer Resource - FYI

Can each Java object keep track of all the threads that want to exclusively access to it?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

36. Can each Java object keep track of all the threads that want to exclusively access to it?

Yes. Use Thread.currentThread() method to track the accessing thread.

(Continued on next question...)

Other Interview Questions