September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,9 +0,0 @@
|
|||
public static Object[] objArrayConcat(Object[] o1, Object[] o2)
|
||||
{
|
||||
Object[] ret = new Object[o1.length + o2.length];
|
||||
|
||||
System.arraycopy(o1, 0, ret, 0, o1.length);
|
||||
System.arraycopy(o2, 0, ret, o1.length, o2.length);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
Collection list1, list2, list1And2;
|
||||
//...list1 and list2 are instantiated...
|
||||
list1And2 = new ArrayList(list1); //or any other Collection you want
|
||||
list1And2.addAll(list2);
|
||||
8
Task/Array-concatenation/Java/array-concatenation.java
Normal file
8
Task/Array-concatenation/Java/array-concatenation.java
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
public static Object[] concat(Object[] arr1, Object[] arr2) {
|
||||
Object[] res = new Object[arr1.length + arr2.length];
|
||||
|
||||
System.arraycopy(arr1, 0, res, 0, arr1.length);
|
||||
System.arraycopy(arr2, 0, res, arr1.length, arr2.length);
|
||||
|
||||
return res;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue