Hi Friends, I am beginner in java. what i know about
synchonized keyword is,If more that one 1 thread tries to
access a particular resource we can lock the method using
synchronized keyword. Then after that how the lock is
released and how next thread access that.Please explain with
example.
Answer Posted / ejp
The lock is released when the holding thread exits the
synchronized block.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Explain how to force the garbage collection in java.
What is the use of 'super' keyword inside a constructor?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Explain the difference between throw and throws in java?
What are methods of a class?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
How many bits are in a sentence?
What is difference overloading and overriding?
What is the difference between jvm and jre? What is an interface?
Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.
What is map java?
What is the diffrence between inner class and nested class?
How to Sort Strings which are given in List and display in ascending order without using java api.
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What is the largest long allowed by java?