we have two threads..both the threads are reading the
data.. is there any need of synchronization
there?...justify it?
Answer Posted / babu
sychronization is used to execute only one thread or one
block ata time.if your not declare sychronized in the method
there is chance to execute the mixed data i.e.; to threads
start at atime.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is assembly language?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What is the difference between a switch statement and an if statement?
How do you include a string in java?
What is the default size of set in java?
What is the size of an array?
What is the final field modifier?
If two threads have same priority which thread will be executed first ?
What occurs when an object is constructed?
Explain the difference between serializable and externalizable in java?
What are user defined exceptions?
Can an object subclass another object?
What technique is carried out to find out if a particular string is empty?
Is boolean a data type in java?
Difference between string, string builder, and string buffer?