代码
public class Test_Str{
public static void main(String[] args){
String[] str_1={"1","2","3","4","5","6","7"};
String[] str_2={"a","b","c","d","e","f","g"};
String[] str_3=new String[str_1.length+str_2.length];
System.out.println(" str_1 = "+str_1.length);
System.out.println(" str_2 = "+str_2.length);
System.out.println(" str_3 = "+str_3.length);
System.arraycopy(str_1,0,str_3,0,str_1.length);
System.arraycopy(str_2,0,str_3,str_1.length,str_2.length);
for(int i=0;i<str_3.length;i++){
System.out.println(" str_3["+i+"] = "+str_3[i]);
}
}
}
posted on 2007-11-16 16:36
lk 阅读(1017)
评论(1) 编辑 收藏 所属分类:
j2se