In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to create objects in java related knowledge, content detailed and easy to understand, simple and fast operation, has a certain reference value, I believe everyone read this article how to create objects in java articles will have gains, let's take a look at it.
1. Check whether the class is loaded.
When the virtual machine encounters the new instruction, it first checks whether the parameter of the instruction can be positioned as a symbolic reference of a class in the constant pool, and checks whether the class represented by the symbolic reference is loaded, analyzed, and initialized. Otherwise, execute the class loading procedure.
2. Allocate memory for the target.
After the class load is complete, the virtual machine begins allocating memory for the target, at which point the required memory size is determined. Just allocate the necessary memory on the heap.
Initialize a value of zero for the allocated storage space.
After the memory allocation of the object is completed, the memory space of the object needs to be initialized to zero to ensure that the object can be used directly even if there is no initial value.
4. Make other settings for the audience.
After allocating memory space and initializing the zero value, the virtual machine also needs to perform other necessary settings on the object. The setting place is in the head of the object, including the class to which the object belongs, the class metadata information, the object hashcode, the GC proxy age and other information.
5. Execute the init method.
After performing the above steps, even if the object in the virtual machine succeeds, the Java program needs to implement the init method, because the object at this time is only initialized with zero values, and there is no real initial value assigned according to the code in the program, so after calling the init method, the object can really be used.
Spring Web MVC is a Java-based lightweight Web framework that implements the request-driven type of Web MVC design pattern.
Apache Shiro is a Java security framework.
Mybatis is an excellent persistence layer framework that supports ordinary SQL queries, stored procedures, and advanced mappings.
Dubbo is a distributed services framework.
Maven is a project management and build automation tool.
RabbitMQ is a highly concurrent and reliable AMQP message queue server implemented with Erlang. EhCache is a pure Java in-process caching framework.
About "how to create objects in java" the content of this article is introduced here, thank you for reading! I believe everyone has a certain understanding of "how to create objects in java" knowledge. If you still want to learn more knowledge, welcome to pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.