It's a long story--the understanding of automatic packaging

Source: Internet
Author: User
Today, some students asked me about the "automatic packaging" is how to understand, I think a little bit, wrote the following text, share with you, humble opinion, I hope you have more suggestions, discuss with each other.
Earlier versions of Java (1.4 and earlier, including the 1.4 version) divided Java into two data types, one for basic data types, such as Int,char float Boolean, and another type called reference type, such as String,object. The purpose is to use object-oriented thinking to complete the code writing, but also to keep the computer to maintain a certain computational performance (basic data type calculation speed, and object type calculation is slow).
This, however, brings up something that bothers Java programmers: the type conversion between them is cumbersome because of the complete incompatibility of the basic data types and object types. Java is designed to convert the basic type to an object type, and then the operation of the form, but the entire code in the earlier version of the programmer need to do their own manual, which brings the programmer's mechanical operation and memory.
At this time, Microsoft launched the c#2.0, it does not require the programmer to complete the basic data type and object type conversion, and the process of this type of automation took two names, from the basic data type to the object type named "Boxing", from the object type to the basic data type called "Unpacking", God, Mom doesn't have to worry about me anymore. Type! The programmer likes to rush, applauded.
Microsoft can do, we can also Java! So in 1.5 when the concept of "automatic packaging", and in order to illustrate this version of the history of the big change, the external release is no longer called "Java SE 1.5", but renamed to "Java SE 5.0", the amount of God Ah, hey.
Living in the happiness of today's you, you should thank us for the hard work of the older programmers, it is because of our older programmers tirelessly looking for a variety of lazy solutions, so that you live in a happy today.
So, you have to inherit the legacy of the programmers, diligent and lazy, find ways to make the world a happier way.

It's a long story--the understanding of automatic packaging

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.