Home > Back-end >  Value passed judgment reference
Value passed judgment reference

Time:12-07

1. The first understand the basic types of data and reference type variables stored in the stack, new out of the object in the heap
2. In the life cycle of the stack method with recycling, transferring values of basic types, so the method to return to normal after the
3. Reference type is the address of the object in the stack, heap real object is stored in the content, the method call transfer is address, so the actual content of the object to modify it will affect the heap, but if the content is not parameter points to the original address, pointing to the object, then to modify parameters refer to the object will not affect the content of the argument, for example, a User object in the method parameters, the method of new a new object to it, so it changes will not affect the argument's address object

CodePudding user response:

BBS more recently a lot of popular science

CodePudding user response:

Own understanding of learning

CodePudding user response:

Emphasis on understanding, don't just parrot
And not only to learning, but also to know the why
Come on,,,

CodePudding user response:

This popular why not go to blog, BBS and write?
  • Related