public class TestCopy { public TestCopy() { } public static void main(String[] args) { byte[] a = new byte[10]; for (int i = 0; i < a.length; i++) { a[i]=(byte)i; } byte[] b = new byte[10]; System.arraycopy(a,0,b,0,a.length); for (int i = 0; i < b.length; i++) { System.out.println(b[i]); } }}
{
public TestCopy()
{
}
public static void main(String[] args)
{
byte[] a = new byte[10];
for (int i = 0; i < a.length; i++) {
a[i]=(byte)i;
}
byte[] b = new byte[10];
System.arraycopy(a,0,b,0,a.length);
for (int i = 0; i < b.length; i++) {
System.out.println(b[i]); }
}}