qingwu wang
,
Ranch Hand
Hello everyone,I want to know how many methods can resolve it.
I try to use loop to do it,but I think it is not a good thing.
qingwu wang
,
Ranch Hand
I implement it as following:
so I got it.but I donnt know if I should do so.
[ July 28, 2003: Message edited by: qingwu wang ]
chi Lin
,
Ranch Hand
qingwu,
I think you can use arraycopy() method from System class to achieve it.
Jamie Robertson
,
Ranch Hand
You could write a merge method ( or I can ):
or you could utilize the List interface:
Hope that helps,
Jamie
[ July 29, 2003: Message edited by: Jamie Robertson ]
Ron Newman
,
Ranch Hand
There's also this operation:
list1.addAll(list2);
qingwu wang
,
Ranch Hand
Thanks chi,Jamie,Ron...
Joe Pluta
,
Ranch Hand
A little simpler, but not as efficient:
Joe
tomer peretz
,
Greenhorn
Object[] obj3a = new Object[obj1.length + obj2.length];
System.arraycopy(obj1, 0, obj3a, 0, obj1.length);
System.arraycopy(obj2, 0, obj3a, obj1.length, obj2.length);
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com