Having the update method be synchronized will prevent more than one thread executing it at the same time.
Type: Posts; User: Norm
Having the update method be synchronized will prevent more than one thread executing it at the same time.
The code in the two threads should call a single synchronized method that does the updates to the disk file to prevent collisions. That assumes that there is some control over what order the data is...
Are you confusing the concepts of an execution time thread that allows method execution and an instance of a class that extends the Thread class?
Defining and accessing variables defined in...