JAVA线程安全类

package Multithreading;

import java.util.*;

public class BuyTicketDemo {
    public static void main(String[] args) {
        StringBuffer sb = new StringBuffer();
        StringBuilder sb2= new StringBuilder();

        Vector<String> v= new Vector<String>();
        ArrayList<String> arrayList = new ArrayList<String>();

        Hashtable<String,String> hs= new Hashtable<String,String>();
        HashMap<String,String> hs2 = new HashMap<String,String>();
        
        List<String> list = Collections.synchronizedList(new ArrayList<String>());

    }
}

 

posted @ 2022-04-07 22:48  phpwyl  阅读(38)  评论(0编辑  收藏  举报