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
Why is java logo a cup of coffee?
What is meant by tab pans?
Difference between overriding and overloading in java?
What is get () in java?
What is meant by call by reference?
What is proper subset?
How to change the priority of thread or how to set the priority of thread?
What's the difference between int and integer in java?
What is consumer interface?
Why vector class is used?
What are the types of collections in java?
Can we define a package statement after the import statement in java?
What two classes are used to read data only?
Can we change the scope of the overridden method in the subclass?
What is java argument list?