we have two threads..both the threads are reading the
data.. is there any need of synchronization
there?...justify it?
Answer Posted / ranjan
synchronization is necessary in threads
problem.synchronization means at a time only one thread can
access it.If it is not done then one thread will read the
resource & other will try to update it.It will create a
problem.
| Is This Answer Correct ? | 3 Yes | 11 No |
Post New Answer View All Answers
Why java is considered as platform independent?
How you can force the garbage collection?
I want to print “hello” even before main is executed. How will you acheive that?
What is the default access specifier for variables and methods of a class?
What is pre increment and post increment in java?
Explain illegalmonitorstateexception and when it will be thrown?
How to run a JAR file through command prompt?
Is ruby built on java?
What is the requirement of thread in java?
Which of the following classes will have more memory allocated?
How do you join strings in java?
Can this keyword be used to refer static members?
Explain the importance of join() method in thread class?
What is string intern in java?
What is the difference between iterator and enumeration ?