Results 1 to 1 of 1
Thread: Pass by ref. A work around?
- 02-05-2008, 08:25 PM #1Member
- Join Date
- Feb 2008
- Rep Power
Pass by ref. A work around?
I'm horrified to learn that in Java all variables are passed to methods by value.
I want to write a function that will fit an exponential function(y = A*exp(B*x) ) to some data. In C++ I would just pass the data along with references to variables for A and B to a method and have the method manipulate A and B.
In java it seems I need to have two different methods; one to return A and one to return B.
Is there a way around this?
- By Brucifer in forum New To JavaReplies: 0Last Post: 04-02-2008, 11:23 PM
- By sivasayanth in forum New To JavaReplies: 3Last Post: 01-13-2008, 05:33 PM
- By piterskiy74 in forum Web FrameworksReplies: 0Last Post: 12-11-2007, 04:17 PM
- By fred in forum Java AppletsReplies: 1Last Post: 08-06-2007, 03:28 AM
- By mathias in forum Java AppletsReplies: 1Last Post: 08-03-2007, 10:52 AM