ArrayList in java is thread safe.and it is implemented using array.
So, is the access to arrays in java thread safe??does the access to arrays needs to be synchronized??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No,
ArrayListisn’t thread-safe in Java.From the docs:
Are you thinking of
Vector, which uses synchronization internally? (Each method is synchronized, basically.)