| | |
JAVA: copying 1d array's value into a specific row of a 2d array
Thread Solved
![]() |
The twoDArray in your case is just an array of size 10 with each slot referring to a integer array i.e. two dimensional arrays in Java are just an array of arrays. Hence you can either use
twoDArray[3] = oneDArray; or System.arraycopy if you don't want modifications in the original oneDArray to be reflected in twoDArray. Also read this. I don't accept change; I don't deserve to live.
•
•
Join Date: Dec 2008
Posts: 4
Reputation:
Solved Threads: 0
thnx for the valuable input...appreciate it..muah.
•
•
•
•
The twoDArray in your case is just an array of size 10 with each slot referring to a integer array i.e. two dimensional arrays in Java are just an array of arrays. Hence you can either usetwoDArray[3] = oneDArray;orSystem.arraycopyif you don't want modifications in the original oneDArray to be reflected in twoDArray. Also read this.
![]() |
Other Threads in the Java Forum
- Previous Thread: IP blocking or MAC address blocking
- Next Thread: noclassdeffound error
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array automation bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse error fractal freeze ftp functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide image int j2me j2seprojects java javac javaee javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux mac main map method mobile myregfun netbeans nonstatic notdisplaying number online pearl printf problem program project qt researchinmotion rotatetext rsa scanner screen server set singleton sms sort spamblocker sql string swing system textfields thread threads time title tree tutorial-sample update variablebinding windows working xor






