Computer Science, asked by imtiajtarafder78491, 1 year ago

which of these is synchronized? arraylist linkedlist vector none of the listed options

Answers

Answered by ankurbadani84
1

Answer:

Vector

Explanation:

Vector out of the list is synchronized.

Vectors are thread safe. It has methods like get ( int i ) , add ( ). These methods are enclosed with a synchronized block.

However ArrayList is not synchronized. It can be made synchronized using below Java methods.

Collections.synchronizedList ( List list )

Collections.synchronizedMap( Map map )

Collections.synchronizedCollection ( Collection c )

Linkedlist is also not synchronized.

Similar questions