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

Can a class have 2 constructors?

498


What is the purpose of static methods and static variables?

538


Can you inherit from an abstract class java?

525


how does the run() method in runnable work? : Java thread

511


Is array primitive data type in java?

529






Why do you canvas?

607


What does java se mean?

586


What is the difference between method overriding and overloading?

574


What is Garbage Collection in Java

607


What is the implementation of destroy method in java. Is it native or java code?

480


What is static data type in java?

540


What is private static in java?

577


How do you escape in java?

577


What are methods in java?

536


Why stringbuffer is faster than string?

533