public static void main (){
byte[] a = get();
byte[] b = {1,2,3,4};
System.arraycopy(a, 0, b, 2, 2);
System.arraycopy(b, 0, a, 0, 2);
}
public static byte[] get(){
byte c={5,6}; // byte c= new byte[2];...
return c;
}
My question is: what the difference between returning byte c={5,6}
and byte c=new byte[2]; c[0]=5;c[1]=6;
?