what is mean by thread lock?

Answers were Sorted based on User's Feedback



what is mean by thread lock?..

Answer / maninder kaur

thread locking is achieve by synchronized keyword.
for eg...
public synchronized void disp()
{
}

or

public void disp()
{
synchronized(this)
{
}
}

it makes a lock on disp method until we comes to the end of the block.
so that no other thread can modify it.

Is This Answer Correct ?    6 Yes 0 No

what is mean by thread lock?..

Answer / ravi ranjan

ANSWER- Means particular object can access resources

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do you use equal in java?

0 Answers  


When throw keyword is used?

0 Answers  


What is intern method in java?

0 Answers  


What are the 3 types of loops in java?

0 Answers  


What is final, finally, finalize?

0 Answers  






Is treeset sorted in java?

0 Answers  


what is thread? What are the high-level thread states? : Java thread

0 Answers  


What is difference between throw and throws ?

0 Answers   Cyient,


what is j2se

3 Answers  


What is run time allocation?

0 Answers   Fidelity,


What are the benefits of operations?

0 Answers  


Tell us something about different types of casting?

0 Answers  


Categories