Why ArrayList class is not a synchronized class and why it
is not a thread safe class? explain
Answer Posted / 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 |
Post New Answer View All Answers
What is a stack class in java ?
What is byte [] in java?
What is the size of boolean variable?
What is better- service oriented or batch oriented solutions?
What is the difference between this() and super() in java?
What is the function of static in java?
Is jdk required on each machine to run a java program?
What is use of super keyword?
What is printwriter in java?
Can you explain the meaning of aggregation and composition
Can we cast any other type to boolean type with type casting?
Explain public static void main(string args[]) in java.
What is the do while loop syntax?
When should the method invokelater() be used?
What is package protected in java?