File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes function variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "function variables" Watch "function variables" New topic

function variables

Stephan Lefebvre

Joined: Jun 23, 2001
Posts: 2
Hi, I recently read a discussion note at and it mentioned that variables are past to functions by reference, while in a previous book, and in my experience, it seemed as if things are passed by instance and the function does not affect the passed data structures unless they(or more accurately, it) are returned.
What�s the real deal with data transfer and is there any way to control it like in c?
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Find the "real deal" with this story from the Campfire Stories Section of JavaRanch :

"JavaRanch, where the deer and the Certified play" - David O'Meara
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

Peter Haggar writes about this in "Practical Java":

Junilu - [How to Ask Questions] [How to Answer Questions]
I agree. Here's the link:
subject: function variables
It's not a secret anymore!