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

Which class has no duplicate elements?

8 Answers  


Name container classes in java programming?

0 Answers  


whats the difference between == and .equal ?

10 Answers   Cisco,


What is treeset in java collection?

0 Answers  


Explain about anonymous inner classes ?

0 Answers  






How do you ensure that n threads can access n resources without deadlock?

0 Answers  


What is the difference between conversation & casting?

0 Answers  


Can we use catch statement for checked exceptions?

0 Answers  


what are the difference between Java and .Net?

5 Answers  


What is the difference between Stream Reader and Stream Writer?

4 Answers  


What is array in java?

0 Answers  


What is the method to declare member of a class static?

0 Answers   HCL,


Categories