This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
i know this method gets copy of source array but it copies only rows and i would like to know is there any method similar to this one which can copy only columns for me or i have to write it for myself?
I wrote that kind of method ( not big deal anyway ) but i would like to know if there is such method in library?
P.S. i searched java api documentation but couldn't find anything...
Igor [ February 18, 2005: Message edited by: Igor Stojanovic ]
No, arraycopy() works only on a single array. Note that multidimensional arrays are simply arrays of arrays -- not a single array with "rows" and "columns." You must roll your own code.
System.arraycopy() operates directly on the bytes in memory, simply copying one contiguous block of bytes to another location. Since "columns" of a two dimensional array are not contiguous in memory, it cannot be used.