Article View: borland.public.jbuilder.java.language
Article #17969Re: Returning Object Reference as parameters
From: Paul Furbacher
Date: Wed, 09 Sep 1998 00:00
Date: Wed, 09 Sep 1998 00:00
32 lines
1349 bytes
1349 bytes
Michael Nguyen wrote:
>
> I have a subroutine that takes in several objects of different types.
> This subroutine would assign new objects to these parameters,
> so that the caller can use them. To do this, I need to declare
> both the variables in the caller and calle's parameters as arrays of
> size one
> as in the example below. Is there a better way around this
> besides declaring a single java.Object array for all three elements ?
> Thanks for the info.
class Stuff {
int value;
String name;
Object object;
...
} // end of Stuff class
// using Stuff
public void setStuff(Stuff s) {
s.value = newValue;
s.name = newName;
...
}
Paul Furbacher
Technical Details
Message-ID:
<35F6EA2B.FC690E5B@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35F6C181.E937734@home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,8f52af31779ed231 X-Google-Attributes: gidf74b3,public From: Paul Furbacher <pf@bilbo.bio.purdue.edu> Subject: Re: Returning Object Reference as parameters Date: 1998/09/09 Message-ID: <35F6EA2B.FC690E5B@bilbo.bio.purdue.edu> X-Deja-AN: 389505753 Content-Transfer-Encoding: 7bit References: <35F6C181.E937734@home.com> To: Michael Nguyen <michaelmn@home.com> Content-Type: text/plain; charset=us-ascii Organization: Biological Sciences, Purdue Univ. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.language