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 |
Write an algorithm for quick sort?
how can i use a nonsynchronized hashtable?
is it mandatory to deaclare all variables public static fianl in interfaces?if i declare like in the below program, public interface A { public static final int I=0; int j=0; } in interface A,what is the difference between I,j?
What is a variable and constant?
What does the three dot emoji mean?
What is a “stateless” protocol ?
What does java final mean?
What happens when a class is made static like if a field or member is made static it becomes class variable and is shared by all the object of the class?
How do you differentiate abstract class from interface?
Why null value is used in string?
What are the default and parameterized constructors?
What is bigger kb or mb?