package ThreadDemoPack01;import java.util.*;public class ThreadDemo01 {public static void main(String[] args){StringBuffer sb = new StringBuffer();//线程安全StringBuilder sb2 = new StringBuilder();//线程不安全Vector<String> v = new Vector<String>();//线程安全ArrayList<String> array = new ArrayList<String>();//线程不安全Hashtable<String,String> ht = new Hashtable<String,String>();//线程安全HashMap<String,String> hm = new HashMap<String ,String>();//线程不安全List<String> list = Collections.synchronizedList(new ArrayList<String>());Map<String, String> map = Collections.synchronizedMap(new HashMap<String, String>());}}