Many common classes are thread - compatible , such as the collection classes 許多常見的類是線程兼容的,如集合類
Doing so will enable thread - compatible objects held as instance variables in other thread - safe objects to piggyback on the synchronization of the owning object 這樣做會使線程兼容的對象作為變量實例包含在其他線程安全的對象中,從而可以利用其所有者對象的同步。