|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#74. Given: 1. public class MyLogger { 2. private StringBuilder logger = new StringBuuilder(); 4. logger.append(message); 5. logger.append(user); 6. } 7. }
The programmer must guarantee that a single MyLogger object works properly for a multithreaded system. How must this code be changed to be thread-safe?
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.394
|
Server date 05:30 10-01-2009
|
Developed by Zip © 2006
|
|
 |
|
|