what is mean by thread lock?
Answers were Sorted based on User's Feedback
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 |
Answer / ravi ranjan
ANSWER- Means particular object can access resources
| Is This Answer Correct ? | 1 Yes | 0 No |
What is nested class?
What is a null check?
Is there a way to increase the size of an array after its declaration?
String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ?
6 Answers Flextronics, Keane India Ltd,
adapter class ?
Can we catch more than one exception in a single catch block?
what is the purpose of the final in the try-catch-final
What is hash in java?
Can bool be null?
What is nested loop? What is dangling else condition in it?
java Api provided try catch finally ,try catch(its ok) but why try finally and exception occured at try then how the flow is?
Which class is the superclass of all classes?