How can we create a synchronized collection from given collection?
Answer / Param Vikram Singh
To create a synchronized collection, use the Collections.synchronizedCollection() method for List-based collections (ArrayList, LinkedList) or Collections.synchronizedSet() and Collections.synchronizedMap() for Set-based collections (HashSet, TreeSet) and Map-based collections (HashMap, TreeMap).
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the loop in java?
How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car object. On what basis it will sort?
What is thread safe java?
Why singleton is not thread safe?
what is polymorphism?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
Can an abstract class be a final class?
Explain java heap space and garbage collection?
What is the difference between object oriented programming language and object based programming language?
What is the main functionality of the remote reference layer?
What is an infinite loop in java? Explain with an example.
How to convert string to int in java?