ok so I am trying to learn about arrays, and I found thee on a book that you can use the arraycopy method to do it more simple
so I did these code with the directions It is really not a big deal but I cannot figure out what is wrong I keep getting the same error that I need object, and I have arrays, but I found it under arrays topic. maybe is so dumb I am donīt see it. I would appreciate some help.
the code is the following
public class ArrayCopy{ public static void main(String[]args){ int[]sourceArray={1,2,3,5,3,6}; int[]targetArray= new int[6]; System.arraycopy(sourceArray, 0, targetArray, 0); for( int i =0; i<targetArray.length; i++) System.out.println("Taget Array"); System.out.println( targetArray[i] + " " ); }}
thankss