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 |
Can anonymous class have constructor?
Explain jvm, jre, and jdk?
What do you mean by composition in java?
what is the major difference between linkedlist and arraylist in java?
Relationship between an event-listener interface and an event-adapter class?
What are thread safe functions?
What is string in java is it a data type?
Differentiate between overriding and overloading cases?
What is busy spin, and why should you use it?
Can I overload to string method
Can u overload main()method.Give with example.
6 Answers IBM, Schimatic Technologies,
What are Font and FontMetrics classes?