Results 1 to 3 of 3
  1. #1
    lala is offline Member
    Join Date
    Oct 2010
    Posts
    80
    Rep Power
    0

    Default 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

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,037
    Rep Power
    10

    Default

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    lala is offline Member
    Join Date
    Oct 2010
    Posts
    80
    Rep Power
    0

    Default Reference variable

    Thank you. What a refreshing explanation.
    lala

Similar Threads

  1. Replies: 5
    Last Post: 01-26-2011, 07:38 PM
  2. static variable /pass by reference
    By katturv in forum New To Java
    Replies: 15
    Last Post: 10-03-2010, 09:17 AM
  3. Replies: 11
    Last Post: 07-07-2010, 07:02 AM
  4. persistent of same reference twice
    By smackdown90 in forum Web Frameworks
    Replies: 0
    Last Post: 04-25-2010, 07:53 PM
  5. Getting the Object Reference Name
    By Deathmonger in forum New To Java
    Replies: 2
    Last Post: 03-12-2008, 03:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •