Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing int[ ] to a method

 
Ben Buchli
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I am trying to pass an int array to a method but somehow it gets dumped somewhere between setArray() and calling the getArray() methods.
I checked all possible ways that came to my mind, but was not successful.
right after creating the array, the ints are in the array as they should be.
right after setArray() in my helper class, the array is as it should be.
but then, a little while later, when I call the arrayToString() method, all my 30 objects (all the same type, but different values) return the same array, not different ones, as they should...
is there something i miss with passing an array to a method??
any helps is greatly appreciated
ben
 
Ben Buchli
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the help...
I guess I figured it out.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm glad we could serve as your Cardboard Analyst.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic