Read think in Java I have a few questions have been not too understanding, the physical memory should not have stacks and heaps, Java's basic data types are stored in the stack, the mechanism is LIFO, objects are stored in the heap, the stack is just for simple access, That is, when an object is instantiated to run it is equivalent to creating 2 objects, one to save the object in the memory heap, one to record the absolute address in the memory stack, and the list,arraylist,linkerlist,stack and so on. queues, etc. access mechanisms, these objects are saved in the heap. There is no doubt that the stack records the address, their processing mechanism is on the Java Virtual machine processing for collection class arrangement, and then logical operation according to access, can also say that these containers are generic class, but generic class is not all containers? I feel not, of course, I do not know the exact answer, the above is my personal understanding, also do not know is not very correct, I hope to know the master answer, will not be nonsense, related to my development thinking, thank you!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service