Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
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: 6310

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!