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

Describe the process as to how substring() methodology mechanisms in java.

0 Answers  


What is hashing in java?

0 Answers  


What is difference between hashset and hashmap?

0 Answers  


What are the types of sockets in java?

0 Answers  


explain copyonwritearraylist and when do we use copyonwritearraylist?

0 Answers  






What are the different approaches to implement a function to generate a random number?

0 Answers   Axtria, ITC Indian Tobacco Company,


What is a buffer in java?

0 Answers  


What is immutable in java?

0 Answers  


What is main difference between variable and constant?

0 Answers  


where the static methods will live ,on stack ? can you explain brefly

1 Answers  


What is the root class for all Java classes?

8 Answers   IBM, Infosys,


What is unmodifiable list in java?

0 Answers  


Categories