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 |
Give me example of derived data types.
What carriage return means?
What is the life-cycle of an object?
What is array size in java?
Whats the difference between notify() and notifyall()?
What JNDI(Java Naming and Directory Interface) provides?
Explain role of constructor in a java application?
What is bubble sort in java?
What is arraylist e?
Which method returns the length of a string?
How do you reverse a word in java?
What is JFC?