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 executor memory?
Can a class be private in java?
What are static blocks and static initalizers in java ?
How does arraylist size increase in java?
Why are functions called methods in java?
What is early binding and late binding in java?
How can we create an immutable class in java?
Can we clone singleton object in java?
What is lazy initialization in java?
make a method which any number and any type of argument and print sum of that arguments.....
Is a boolean variable?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Can abstract class have private constructor?
Which class is the superclass of all classes?
What is the use of using enum to declare a constant?