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

Can you instantiate the math class in Java?

0 Answers   IBS,


What is subsequence of a string?

0 Answers  


Why does my function print none?

0 Answers  


If you are reviewing the code of your team members, what points will you look at, assuming the performance of the application is not so great

2 Answers   KPIT,


What are recursive functions?

0 Answers  






Where the CardLayout is used?

1 Answers  


What is the argument type of main() method?

2 Answers  


what is diff bet iterator and enumeration?

4 Answers  


What is the primitive type byte?

0 Answers  


What are decalarations?

0 Answers  


Why are arrays useful in java?

0 Answers  


What is JFC?

0 Answers  


Categories