Java variable references -


I'm sorry if this question is really silly but I was thinking that someone could tell me why Is:

  string halstrings = "hello"; String referencesofholo = halstrings; Hello string = "bye"; Println (referenceOfHello);  

And the production is Hello. I was expecting goodbye for production but it did not happen. I know this is a very basic question, but I always thought that the reference is stored by the Buffalo memory instead of its value, instead of its value.

Thank you.

code

  string halstrings = "hello with explanation in the comment "; // mem address 1001 with string reference creates variables in heap = hello = hello string; // now referencing hello and halstrring poemnting the same object hello string = "bye"; // Now, hello string indicates that the difference object is 1002, but still, the reference will point to the FAO 1001 object  

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -