Program to Copy One Array to Another using Assignment operator
Program to Copy One Array to Another using Assignment operator
Program:
public class CopyArrayAssignment {
public static void main(String args[])
{
int arr[]={1,2,3,4,5};
int copyarr[]=arr;
for(int i:copyarr)
{
System.out.println(i);
}
}
}
// 1
// 2
// 3
// 4
// 5
Comments
Post a Comment