当前位置:网站首页>Emballage automatique et déballage compris? Quel est le principe?
Emballage automatique et déballage compris? Quel est le principe?
2022-07-03 09:53:00 【Look word】
Emballage automatique et déballage compris??Quel est le principe?
Qu'est - ce qu'une boîte de démontage automatique?
- Emballage:Envelopper les types de base avec leurs types de référence correspondants;
- Déballage:Convertir le type d'emballage en type de données de base;
Exemples:
Integer i = 10; //Emballage
int n = i; //Déballage
Fichier Bytecode
L1
LINENUMBER 8 L1
ALOAD 0
BIPUSH 10
INVOKESTATIC java/lang/Integer.valueOf (I)Ljava/lang/Integer;
PUTFIELD AutoBoxTest.i : Ljava/lang/Integer;
L2
LINENUMBER 9 L2
ALOAD 0
ALOAD 0
GETFIELD AutoBoxTest.i : Ljava/lang/Integer;
INVOKEVIRTUAL java/lang/Integer.intValue ()I
PUTFIELD AutoBoxTest.n : I
RETURN
À partir du code byte,Nous avons découvert que l'emballage était en fait un appel EmballagevalueOf()Méthodes,Déballer, c'est appeler xxxValue()Méthodes.
Donc,,
Integer i = 10Équivalent àInteger i = Integer.valueOf(10)int n = iÉquivalent àint n = i.intValue();
Attention!:Si les boîtes sont démontées et emballées fréquemment,Il peut également affecter gravement le rendement du système.Nous devrions essayer d'éviter les opérations inutiles de déballage
private static long sum() {
// Il faut utiliser long Au lieu de Long
Long sum = 0L;
for (long i = 0; i <= Integer.MAX_VALUE; i++)
sum += i;
return sum;
}
边栏推荐
- 【22毕业季】我是毕业生yo~
- Education is a pass and ticket. With it, you can step into a higher-level environment
- Uniapp realizes global sharing of wechat applet and custom sharing button style
- Characteristics of PUCCH formats
- 嵌入式系统没有特别明确的定义
- Project cost management__ Cost management technology__ Article 7 completion performance index (tcpi)
- Convert IP address to int
- 手机都算是单片机的一种,只不过它用的硬件不是51的芯片
- The cyclic shift of PUCCH in NR channel is generated by MATLAB
- Epollet lessons
猜你喜欢

Nodemcu-esp8266 development board to build Arduino ide development environment

STM32 serial communication principle

SSB Introduction (PbCH and DMRs need to be supplemented)

我想各位朋友都应该知道学习的基本规律就是:从易到难

要選擇那種語言為單片機編寫程序呢
![[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer](/img/90/4de927e797ec9c2bb70e507392bed0.jpg)
[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer

Development of fire evacuation system

MySQL environment variable configuration
![顺利毕业[2]-学生健康管理系统 功能开发中。。。](/img/91/72cdea3eb3f61315595330d2c9016d.png)
顺利毕业[2]-学生健康管理系统 功能开发中。。。

Intelligent home design and development
随机推荐
MySQL Data Definition Language DDL common commands
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
[keil5 debugging] warning:enumerated type mixed with other type
Blue Bridge Cup for migrant workers majoring in electronic information engineering
学历是一张通行证,门票,你有了它,可以踏入更高层次的环境里
干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
Nr--- Pusch I: sorting out the agreement process
UCI and data multiplexing are transmitted on Pusch - determine the bit number of harqack, csi1 and csi2 (Part II)
There is no specific definition of embedded system
对于新入行的同学,如果你完全没有接触单片机,建议51单片机入门
Qt QComboBox QSS样式设置
2021-09-26
byte alignment
2020-08-23
Notes on C language learning of migrant workers majoring in electronic information engineering
[CSDN] C1 training problem analysis_ Part II_ Web Foundation
Design and development of biological instruments
The third paper of information system project manager in soft examination
Electronic product design, MCU development, circuit cloning
嵌入式系统没有特别明确的定义