1. 使用`Arrays.copyOf()`和`Arrays.copyOfRange()`方法创建新数组。
```java
int[] sourceArray = {1, 2, 3, 4, 5};
int[] newArray = Arrays.copyOf(sourceArray, sourceArray.length + 1);
newArray[sourceArray.length] = 6; // 在末尾添加新元素
2. 使用`System.arraycopy()`方法将元素复制到目标数组中。
```java
int[] sourceArray = {1, 2, 3, 4, 5};
int[] targetArray = new int;
System.arraycopy(sourceArray, 0, targetArray, 0, sourceArray.length);
targetArray[sourceArray.length] = 6; // 在末尾添加新元素
3. 使用Apache Commons Lang3库中的`ArrayUtils.addAll()`方法。
```java
import org.apache.commons.lang3.ArrayUtils;
int[] sourceArray = {1, 2, 3, 4, 5};
int[] newArray = new int[sourceArray.length + 1];
System.arraycopy(sourceArray, 0, newArray, 0, sourceArray.length);
newArray[sourceArray.length] = 6; // 在末尾添加新元素
4. 使用Java 8的Stream API。
```java
int[] sourceArray = {1, 2, 3, 4, 5};
int[] newArray = IntStream.concat(IntStream.of(sourceArray), IntStream.of(6))
.toArray();
5. 使用Java 8的`Arrays.stream()`和`flatMap()`方法。
```java
int[] sourceArray = {1, 2, 3, 4, 5};
int[] newArray = Arrays.stream(sourceArray)
.flatMap(i -> IntStream.of(i, 6))
.toArray();
以上方法都可以用来合并或串接数组,具体选择哪种方法取决于你的需求和代码风格。