Because you are using iterator but you never increase value of x and y you are using in the loop.
Insert y=0; before line 92
Insert y++; after line 96
Insert x++; before line 98
Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
So did you print it out after the loop to see that the value exists? If yes, but when you call it from other class, what error you got?
If there is still a problem, you could try to create a copy of the array and return it.
Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
I have answered your same question here ...
apines
Practically a Master Poster
633 posts since Apr 2007
Reputation Points: 129
Solved Threads: 55