Why ArrayList class is not a synchronized class and why it
is not a thread safe class? explain
Answer / atre sachin
If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.)
| Is This Answer Correct ? | 2 Yes | 0 No |
What is a J2EE component? List out all the component?
what are the difference between Java and .Net?
What is the difference between jvm and jre? What is an interface?
What is sortedmap in java?
What are the differences between stringbuffer and stringbuilder?
What is :: operator in java?
What class of exceptions are generated by the java run-time system?
What are constants and how to create constants in java?
What does @override mean?
What's the purpose of using break in each case of switch statement?
Explain about class in java?
Can a constructor call another constructor?