The synchronized keyword is one of the most important keywords that you may use while using Threads. At the end of the previous chapter, we had used the term race-condition. In crude terms it refers to a scenario wherein one thread is attempting to read a value that is being changed by another thread. The purpose of the synchronized keyword is to help prevent such a situation.
Before we try to