java - array copy

ArrayList: an array to store data; strong indexing capabilities.
JNI (Java Native Interface): local interface;

  If A, B two arrays of the same type, A = B traditional values, is equivalent to a reference array variable passed to another array. If an array is changed, another array change will occur.

  Java array replication method, for circulation, clone, System.arrayCopy ();

  System.ArrayCopy (): JNI embodiment a class implementation class System.
     The arraycopy static void public (the src Object, int srcPos, Object dest, destPos int, int length) ;
     the src: the source array; srcPos: to copy source array starting position; dest: target array; destPos: placing initial target array position; length: length to copy.
     System.arrayCopy can own your own copy.

  

Guess you like

Origin www.cnblogs.com/leizz/p/11588995.html