HI, it's mentioned that we must make server and db classes threadsafe. How to do it? Since we have to implement the lock() method, does it mean once we implement the lock method, then the db class is threadsafe?
Thread safety is about making sure that multiple clients do not affect each other badly. Simply put, If I call a method on the Data class, I want to make sure that no other client is also running that method at the same time. It is not threadsafe. That's what the synchronized keyword handles. Mark