Difference between ArrayList and Vector

ArrayList and Vector function similarly. On the whole, ArrayList is a "new version" of Vector. Vector has existed since Java 1.0, and ArrayList has only existed since Java 1.2, which is relatively new. Therefore, Vector can be used in various micro versions such as JavaME, Card, etc., and ArrayList cannot. ArrayList does not have the security of thread synchronization, but the speed is faster, so it is called streaking. Vector is thread safe.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326614772&siteId=291194637