Re: Passing Primitive Types "By Reference" In Java

  • From: "black ares" <matematicianu2003@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 4 Feb 2008 07:34:06 +0200

pass it a array of primitives if they are same type
or pass an object array and get primitives by boxing and unboxing
----- Original Message ----- From: "Jared Wright" <wright.jaredm@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Monday, February 04, 2008 6:54 AM
Subject: Passing Primitive Types "By Reference" In Java


Hi Folks, I am familiar with Java's passing all parameters to methods strictly by value. I am also familiar with how it always uses references to indicate objects, and so passing objects by reference is easily accomplished from a practical standpoint--the values of the references are actually passed, but the end result is much the same. I'm unsure though as to what would be the most effective way of passing a primitive type to a method in such a way that the method can modify the original variable. Thanks in advance for any thoughts.

Jared
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: