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
5 Coding best practices you learned in java?
What is the access scope of protected access specifier?
How do you reverse a word in java?
Can we have two main methods in a java class?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What about interrupt() method of thread class ?
What is the console in java?
Explain the available thread states in a high-level?
Define packages in java?
Can we convert integer to string in java?
What modifiers are allowed for methods in an interface?
What do you understand by final value?
What is printwriter in java?
What are the three parts of a lambda expression?
What are peerless components?