Can we use such synchronised objects for the assignment?
Please do not use such synchronised objects as they provide implicit locking which might interfere with the intended synchronisation behaviour of your programs. Instead, please base your programs on unsynchronized collection classes such as ArrayList, TreeMap etc. and add manual, explicit synchronization and/or locking in your code.