java autoboxing

The process that the Java compiler automatically converts the original type to the encapsulated class is called autoboxing, which is equivalent to calling the valueof method of the encapsulated class. for example:

Source code:

 

Code after compilation:

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325188937&siteId=291194637