| Author |
synchronized
|
josephine chen
Ranch Hand
Joined: Oct 29, 2002
Posts: 216
|
|
can i use synchronized keyword with ordinary methods that do not involve threads.If so i want a small example
|
 |
Tony Alicea
Desperado
Sheriff
Joined: Jan 30, 2000
Posts: 3219
|
|
Yes you can. And synchronized methods can be used in a NON-threaded environment. It would be a waste but still... An example? Put the word "synchronized" in front of any method.
|
Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
|
 |
 |
|
|
subject: synchronized
|
|
|