存储数据数组列表 [英] store data array list
本文介绍了存储数据数组列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个arraylist我想将数据存储在arraylist1和arraylist2中的第三个arraylist中。
如何在arraylist3中存储数据?
I have 3 arraylist I want to store data in 3rd arraylist which is same in arraylist1 and arraylist2.
how can I store data in arraylist3?
推荐答案
ArrayList ar1= new ArrayList();
ar1.add("1");
ArrayList ar2= new ArrayList();
ar2= (ArrayList)ar1.Clone();
ArrayList a1 = new ArrayList();
a1.Add( "1" );
ArrayList a2 = new ArrayList();
a2.Add( "2" );
ArrayList a3 = new ArrayList();
a3 = a2; //or a3 = a1; where-ever you want to copy data from.
你好,
构建阵列A& B,在数组C中添加值 [ ^ ]这对您有所帮助。
Hi,
Build arrays A & B, add values in array C[^] this will be helpful to you.
这篇关于存储数据数组列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文