当前位置:网站首页>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;
}
边栏推荐
- 应用最广泛的8位单片机当然也是初学者们最容易上手学习的单片机
- Qt QComboBox QSS样式设置
- You need to use MySQL in the opening experiment. How can you forget the basic select statement? Remedy is coming~
- 內存數據庫究竟是如何發揮內存優勢的?
- Characteristics of PUCCH formats
- Code word in NR
- C language enumeration type
- Getting started with JMX, MBean, mxbean, mbeanserver
- 顺利毕业[2]-学生健康管理系统 功能开发中。。。
- 干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
猜你喜欢

Matlab reads hexadecimal numbers and converts them into signed short

MySQL environment variable configuration

UCI and data multiplexing are transmitted on Pusch - Part I

Hal library sets STM32 clock

MySQL data manipulation language DML common commands

当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学

SCM career development: those who can continue to do it have become great people. If they can't endure it, they will resign or change their careers

Intelligent home design and development

Difference of EOF

Notes on C language learning of migrant workers majoring in electronic information engineering
随机推荐
Intelligent home design and development
Fundamentals of Electronic Technology (III)__ Fundamentals of circuit analysis__ Basic amplifier operating principle
嵌入式系统没有特别明确的定义
Project cost management__ Topic of comprehensive calculation
开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~
2021-01-03
In third tier cities and counties, it is difficult to get 10K after graduation
Code word in NR
Install local sources using yum
Which language should I choose to program for single chip microcomputer
A lottery like scissors, stone and cloth (C language)
Eight working modes of stm32gpio and chip naming rules
【顺利毕业】[1]-游览 [学生管理信息系统]
STM32 serial communication principle
Schematic diagram and connection method of six pin self-locking switch
[keil5 debugging] warning:enumerated type mixed with other type
Hal library sets STM32 clock
Project cost management__ Plan value_ Earned value_ Relationship among actual cost and Countermeasures
要选择那种语言为单片机编写程序呢
Quelle langue choisir pour programmer un micro - ordinateur à puce unique