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 |
Is Java is 100% pure OOPS? Explain?
What is the difference between multiple processes and multiple threads?
What are the two ways you can synchronize a block of code?
What is aggregation and composition ?
how can u apply shallow cloning and deep cloning to create object?
How does predicate work in java?
what is the output??????? public class multireturn { public(int assign x ( int x) { if(4==x) { return 7; } else if (7=x+3) { return 6; } return 5; } }
Can constructor be inherited?
What do you mean by inner class in java? Explain
What is the Set interface?
Break statement can be used as labels in java?
What is static keyword in java?