which of these is synchronized? arraylist linkedlist vector none of the listed options
Answers
Answered by
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
English,
6 months ago
Math,
6 months ago
English,
6 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
Math,
1 year ago
Math,
1 year ago