Monday, June 22, 2015

Java-Array copy

Java-Array copy

 

 

package ArrayMethod;

public class Copy {


public static void main(String[] args) {
int[] a = { 1, 2, 3};
int[] copy = a;

for(int i=0;i<copy.length;i++)
{
System.out.println(copy[i]);
}

}

}

No comments:

Post a Comment