What is synchronization? How it can be achieved?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
synchronization is the process of allowing only one thread
at a time.It's been achieved by marking the method as
synchronized or locking a particular portion of code
| Is This Answer Correct ? | 7 Yes | 5 No |
Answer / sainaveen
Synchronization is a mechanism used to control multiple
threads from accessing shared resources, if multiple
threads access shared resources there might be a chance for
one thread to change the shared values of another thread
leading to errors
| Is This Answer Correct ? | 6 Yes | 8 No |
What is the importance in context in JDBC connection pools?
What is native method in java?
Is null a string?
Is char * a string?
What is collection sort in java?
What is array list in java?
What is the requirement of thread in java?
What is hypertext?
Can we have two main methods in a java class?
How do you reverse a word in java?
What is difference between arraylist and list in java?
What is the need to implement Serializable interface (with no methods) for objects which are to be serialized ? We can write our own functionality which writes objects to streams then why we need to implement and tell JVM that which objects can be serialized.