编程语言
首页 > 编程语言> > JAVA线程安全类

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>());

    }
}

 

标签:安全类,JAVA,HashMap,StringBuffer,ArrayList,线程,Hashtable,new,public
来源: https://www.cnblogs.com/phpwyl/p/16114746.html