SynchronizedList给List加锁

/ Java / 0 条评论 / 821 浏览
	List<String> strs = new ArrayList<>();
	List<String> strsSync = Collections.synchronizedList(strs); 
	
	可达到线程安全