当前位置:网站首页>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;
}
边栏推荐
- GPIO port details, Hal library operation keys
- How does the memory database give full play to the advantages of memory?
- Synchronization control between tasks
- Quelle langue choisir pour programmer un micro - ordinateur à puce unique
- 开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~
- Introduction to chromium embedded framework (CEF)
- Electronic product design, MCU development, circuit cloning
- Project cost management__ Cost management technology__ Article 8 performance review
- How does the nr-prach receiver detect the relationship between prembleid and Ta
- 顺利毕业[2]-学生健康管理系统 功能开发中。。。
猜你喜欢
[Li Kou brush question notes (II)] special skills, module breakthroughs, classification and summary of 45 classic questions, and refinement in continuous consolidation
对于新入行的同学,如果你完全没有接触单片机,建议51单片机入门
Which language should I choose to program for single chip microcomputer
学习开发没有捷径,也几乎不存在带路会学的快一些的情况
Mysql database underlying foundation column
在三线城市、在县城,很难毕业就拿到10K
Project cost management__ Cost management technology__ Article 6 prediction
NR PUCCH format0 sequence generation and detection mechanism
Definition and use of enum in C language
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 5 --blinker_ MIOT_ MULTI_ Outside (lighting technology app + Xiaoai classmate control socket multiple jacks)
随机推荐
Fundamentals of Electronic Technology (III)__ Chapter 6 combinational logic circuit
In third tier cities and counties, it is difficult to get 10K after graduation
当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学
端午节快乐!—— canvas写的粽子~~~~~
Idea remote breakpoint debugging jar package project
CEF下载,编译工程
Project cost management__ Plan value_ Earned value_ Relationship among actual cost and Countermeasures
Schematic diagram and connection method of six pin self-locking switch
QT qcombobox QSS style settings
Project cost management__ Topic of comprehensive calculation
UCI and data multiplexing are transmitted on Pusch (Part VI) -- LDPC coding
Successful graduation [2] - student health management system function development...
[csdn] C1 analyse des questions de formation Partie III Bar _ JS Foundation
An executable binary file contains more than machine instructions
[CSDN] C1 training problem analysis_ Part IV_ Advanced web
2020-08-23
Mysql database underlying foundation column
How does the memory database give full play to the advantages of memory?
Getting started with JMX, MBean, mxbean, mbeanserver
Characteristics of PUCCH formats