what is multitherading

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


Please Help Members By Posting Answers For Below Questions

what is deadlock? : Java thread

708


How many bytes is string in java?

851


What is prime number in java?

730


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

735


What does this () mean in java?

731






what is function overloading in java?

906


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

732


How many types of methods are there?

719


How does a for loop work?

712


How many unicode characters are there?

756


What is deserialization?

775


How java enabled high performance?

773


What about static nested classes in java?

788


What are abstract classes and anonymous classes?

813


What is extension method in java?

764