Why ArrayList class is not a synchronized class and why it
is not a thread safe class? explain



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

Post New Answer

More Core Java Interview Questions

How many types of equations are there?

0 Answers  


What is the difference between comparison done by equals method and == operator?

0 Answers  


How do I type unicode?

0 Answers  


What is difference between overloading and overriding in java?

0 Answers  


Explain the use of sublass in a java program?

0 Answers  






can any one send me the example program of immutable class?

2 Answers   Arfin, TCS,


what is features of jdk 1.5?

2 Answers   Accenture, Satyam, TCS,


What is sortedmap in java?

0 Answers  


What are the OOPS concepts in Java ?

4 Answers   Satyam,


What is the exception hierarchy in java?

0 Answers  


Can we access a database using applets?

2 Answers   Hewitt,


can any one tell me what is advantage of encapsulation

2 Answers  


Categories