Answer Posted / dayanand pujer (from gokak)
Threads commonly share the same memory space area, that’s
why they can share the resources. Threads commonly
communicate by sharing access to fields and the objects
reference fields refer to. This communication type is
extremely efficient, but makes two kinds of problems: thread
interference and memory consistency errors. By the
synchronization tool we can avoid this problem. In other
words, There is very critical situation where we want only
one thread at a time has to access a shared resources. For
example, suppose two people each have a checkbook for a
single account same as like two different threads are
accessing the same account data.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can we have two main methods in a java class?
What is Classloader in Java?
Explain the difference between static and dynamic binding in java?
What is the use of singleton?
Differentiate between the constructors and methods in java?
What are the differences between wait() and sleep()?
What is super constructor?
Can a class have 2 constructors?
What is xslt in java?
What is a class reference?
What is the difference between an array and an array list?
List some important features of java 10 release?
What occurs when an object is constructed?
How do you detect memory leaks?
What does compareto () do in java?