-3

Possible Duplicate:
I need help creating an instance variable and constructors

The second constructor will take one argument, which will be an array of int. This constructor will create an instance array of the same size as the argument and then copy the integers from the argument to the instance array.

Community
  • 1
  • 1
user1804737
  • 65
  • 1
  • 3
  • 9
  • 1
    We answered this question at http://stackoverflow.com/questions/13261677/i-need-help-creating-an-instance-variable-and-constructors – daniel gratzer Nov 07 '12 at 01:14
  • Voting to close as too localized anyway. And the post shows no evidence of effort at all. Please prove that you're not lazy and simply begging for others to do your work for you. Please show your work. – Hovercraft Full Of Eels Nov 07 '12 at 01:14
  • I'm sorry? This is just a simple part of the program I am working on and I was just very confused on how to start. I'm okay because of another thread. – user1804737 Nov 07 '12 at 02:29

1 Answers1

0
this.myArray = Arrays.copyOf(nrray,nrray.length); 

This should create a copy of the passed in int array and assign it to instance array

Santosh Gokak
  • 3,393
  • 3
  • 22
  • 24