Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2008, 08:25 PM
Member
 
Join Date: Feb 2008
Posts: 6
Rep Power: 0
diRisig is on a distinguished road
Post Pass by ref. A work around?
Hello,

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?

Thanks
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on how to pass text of a pulldown Brucifer New To Java 0 04-03-2008 12:23 AM
how to pass array in java? sivasayanth New To Java 3 01-13-2008 05:33 PM
Cannot pass the correct property value to a form piterskiy74 Web Frameworks 0 12-11-2007 04:17 PM
How to pass an html variable as an applet value fred Java Applets 1 08-06-2007 04:28 AM
I can't seem to pass the value of a string variable into a string array mathias Java Applets 1 08-03-2007 11:52 AM


All times are GMT +2. The time now is 09:46 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org