Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing arrays of objects



Arrays of objects are themselves just objects and can be passed as you would any other object:

Object[] foo = new Object[42];
.... do something to foo

callMethod(foo);

....

void callMethod(Object[] bar) {

... use array bar ...

}

In the same way, you can return arrays too:

Object[] someMethod() {

Object[] returnValue = new Object[42];

... set appropriate bits of the array ...

return returnValue;
}

HTH,

Peter

On Saturday, August 17, 2002, at 08:33 pm, malcom wrote:

What's the method to passing java arrays of objects.
I'm searching for "how do I create a dictionary with more than one key/value pair" mail...but i haven't found nothing. Anyone can help me?
Daniele
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Passing arrays of objects (From: malcom <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.