• Post Reply Bookmark Topic Watch Topic
  • New Topic

method returning an array?  RSS feed

 
M Shaw
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
If I have a method that returns an array, say makeArray(), then in another method can I make a new array and set it to the method?
for example something like this:
int[] array2 = makeArray();
 
Campbell Ritchie
Marshal
Posts: 55768
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.

Assuming makeArray returns an int[].
 
M Shaw
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yey! Thank you
 
Campbell Ritchie
Marshal
Posts: 55768
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!