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
How do you escape sequences in java?
What is javac used for?
Which browsers work with java?
Which of the following classes will have more memory allocated?
What is difference between ++ I and I ++ in java?
What are the topics in advance java?
Can you explain the meaning of aggregation and composition
Can we override constructor in java?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What is an class?
What is a local block?
What is the purpose of the System class?
Why is singleton not thread safe?
Explain throw keyword in java?
What is heterogeneous in java?