Results 1 to 3 of 3
Thread: Reference variable
- 02-03-2011, 06:07 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 80
- Rep Power
- 0
Reference variable
Hello all. I am re-reading "reference" variable material.
OK
Reference variables store the address of the object, They do not the store the actual object.
String str = "Java Programming";
The system allocates memory space for "Java Programming" starting at location 1234.
Then the system stores location1234
in the variable str.
So str will have 1234, not "Java Programming".
Am I right?
Thanks
- 02-03-2011, 06:17 PM #2
Recommended reading: JavaRanch Campfire - Cup Size: a Story About Variables
and its follow-up: JavaRanch Campfire - Pass By Value, PleaseHow to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 02-03-2011, 07:27 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 80
- Rep Power
- 0
Similar Threads
-
super class reference variable accesses overriding sub class method
By subith86 in forum New To JavaReplies: 5Last Post: 01-26-2011, 06:38 PM -
static variable /pass by reference
By katturv in forum New To JavaReplies: 15Last Post: 10-03-2010, 08:17 AM -
How do I substitute any variable for a hardcoded variable
By Weazel Boy in forum New To JavaReplies: 11Last Post: 07-07-2010, 06:02 AM -
persistent of same reference twice
By smackdown90 in forum Web FrameworksReplies: 0Last Post: 04-25-2010, 06:53 PM -
Getting the Object Reference Name
By Deathmonger in forum New To JavaReplies: 2Last Post: 03-12-2008, 02:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks