两个Stirng[]拼接成一个数组
import org.apache.commons.lang.ArrayUtils;
String[] str1 = {"Hello","world","java"};
String[] str2 = {"Veriable","syntax","interator"};
String [] str3= {};
String[] both = (String[]) ArrayUtils.addAll(str1, str3);
for(int i=0;i<both.length;i++) {
System.out.print(both[i]+",");
}
结果:
Hello,world,java,