Which of the following statements is false?
a. Thread synchronization is necessary only for shared mutable data, i.e., data that may change during its lifetime.
b. With shared immutable data that will not change, it’s not possible for a thread to see old or incorrect values as a result of another thread’s manipulation of that data.
c. When you share immutable data across threads, declare the corresponding data fields final to indicate that the values of the variables will not change after they’re initialized. This prevents accidental modification of the shared data, which could compromise thread safety.
d. Labeling object references as final indicates that the referenced object is immutable.
d. Labeling object references as final indicates that the referenced object is immutable. Actually, labeling object references as final indicates that the reference will not change, but it does not guarantee that the referenced object is immutable—this depends entirely on the object’s properties.
You might also like to view...
Case-Based Critical Thinking QuestionsCase 1Brenda has finished constructing her new database and populating it with data, and the time has come to begin to test out queries on her new database. She has asked you for some quick tips on the finer points of database queries. What character do you tell Brenda she should use to match any number of characters?
A. $ B. # C. * D. &
Match the following comparison operators with their symbol:
I. Equal II. Greater than III. Less than IV. Greater than or equal to V. Less than or equal to A. > B. < C. = D. <= E. >=
Extra space between lines of text within a document can be removed by using the ________ button
A) Remove spacing B) Compact text C) Spacer D) No spacing
Adobe Dreamweaver CS6 is a powerful ____________________ program that lets you create interactive web pages containing text, images, animation, sounds, and video.
Fill in the blank(s) with the appropriate word(s).