Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing non-sync'd method of class when sync'd method is locked

I have a synchronized method and a non-synchronized method in a class, and I have one thread that obtains a lock on the synchronized method.

My question is this: can other threads access the non-synchronized method of the class in this situation?

like image 915
Siva Avatar asked Dec 06 '25 20:12

Siva


1 Answers

Yes. The method remains accessible to other threads if it is not declared synchronized

like image 146
GETah Avatar answered Dec 08 '25 09:12

GETah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!