Answer Posted / john noah
In a single threaded system program executes in a sequence
line by line. Multithreaded system can allow multiple
threads to execute a program parallel in multiple instances.
If there is any part of code dealing with the object data
modification, there is no guarantee that it will not be
attempted any more than one thread at a time.
there's a need to make sure that such kind of code should be
executed exclusively. To achieve this in Java we a concept
of LOCK. Using Lock mechanism thread holds complete hold on
an object and object is also can not be access any other
thread except the thread holding that lock. Lock is an
object level control and one thread only can hold it at a time.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What does I ++ mean?
What is a function argument in java?
Is there is any difference between a scrollbar and a scrollpane?
Are arrays classes in java?
What is thread life cycle?
Can we declare array without size in java?
How do you create a method in java?
What does this mean java?
Can we override static methods in java?
Give few difference between constructor and method?
What is abstract class constructor called?
Explain Basics of OOP Language in java
How do you check if an arraylist is not empty?
Differentiate between overriding and overloading cases?
How to sort an array from smallest to largest java?