Hi guys ;

Question :-

Study the specification of the arraycopy method in the System class, and then write a
short program that uses the arraycopy method to copy all the elements of an array to
another array. Output the elements in the destination array to make sure the copying
actually occurred.

this is my code :-
PHP Code:
  public static Object arraycopy(Object src,  int  srcPos,Object dest, int destPos, int length)
      Object[] srcArray=(Object[]) src;
      Object[] destArray=(Object[]) dest;
      for(int i=srcPos;i<srcPos+length;i++){
       return destArray[i];// cant see srcArray cuz it out of for loop ! what is the solution??
Help me plzzz , :)