Search Interview Questions
| 3180 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Core java - Interview Questions and Answers for 'Cognam technologies' - 1 question(s) found - Order By Newest|
|Ans. The goal of a synchronised block is to achieve mutual exclusion i.e at one time, the segment of the code should be executed by single thread only and hence the lock needs to be retrieved before executing the segment and then released.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve synchronized block synchronized synchronization multithreading threads mutual exclusion concurrency Capgemini Cognam Technologies hewlett packard (HP) BlackRock intermediate   frequent|
Try 1 Question(s) Test
| Which of the following combination of keywords is illegal in Java ? |
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final
|How does volatile affect code optimization by compiler?|
| Which keyword is used to provide explicit access of a code block to single thread ? |
|Can constructors be synchronized in Java ?|
|Difference between Vector and ArrayList ?|
|Why HashTable has been deprecated ?|
|What is an object's lock and which object's have locks?|
|What is Volatile keyword used for ?|
|Difference between StringBuffer and StringBuilder ?|
|What is a Property class ?|