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 |
How do you create a first line indent?
What do you mean by singleton class in java?
Define inheritance?
What is the use of inner class?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
What is adapter class?
What is broken and continue statement?
What are the two types of streams offered by java 8?
What is data type modifier?
Do I need to import java.lang package any time? Why?
Why string is immutable with example?
What do you mean by the term transient?