,现要求ary1中1-2下标的元素赋值到ary2的0-1位置,如何实现?
package work001; public class Array002 { public static void main(String[] args) { int [] ary1= {1,2,3}; int [] ary2= new int [5]; ary2[0]=ary1[1]; ary2[1]=ary1[2]; for(int i =0;i<ary2.length-1;i++) { System.out.println(ary2[i]); } } }