There can be many situations when you are not able to tell, exactly what class will be instantiated until runtime - which is where reflection comes in.
Read-write locks allow multiple threads to acquire a read lock provided no other thread currently has a write lock on the same object. A thread can acquire a write lock if no other thread owns either a read lock or a write lock.