#Copying 2d arrays

10 messages · Page 1 of 1 (latest)

cerulean ravine
#

I know how to copy 1d arrays with a for loop, but how do I copy a 2d array (without a java implemented method (idk if there even is one but without it if there is ))

river heartBOT
#

This post has been reserved for your question.

Hey @cerulean ravine! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

cerulean ravine
#

For some more information because I probably also did something wrong

#

I've got a method,public CommissionedEmployees(String firstName, String lastName, int[][] comissionSchedule2, float basePayRate), and I'm trying to copy int[][] comissionSchedule2 into a private member, int[][] comissionSchedule

#

if you think seeing the entire class would be helpful lmk

gusty plover
#

Nested for loop? I'm not 100% at the moment

cerulean ravine
#

thats how i would do a 1d array but not sure how to do a 2d array in a similar fashion

#

o wait i found a thing on stackoverflow

#

man i love stackoverflow