当前位置:网站首页>String object (constant) pool
String object (constant) pool
2022-06-25 23:35:00 【forwardMing】
The main purpose of object pool is to realize data sharing and processing , With String Object pool as an example , The content is for reuse , Reuse actually belongs to shared design . But in java Middle target ( Constant ) There are two types of pools .
Static constant pool : In procedure (*.class) When loading, the string saved in this program will be automatically 、 Ordinary constants 、 Class and method information, etc , Allocate all
String strA="www.baidu.com"; String strB="www"+"baidu"+"com"; System.out.println(strA==strB);//trueEverything in this program is constant data ( String constants are all anonymous data ), Therefore, the corresponding connection will be handled when the program is loaded ;
Runtime constant pool : After a program is loaded , There may be some variables in it
String info="baidu"; String strA="www.baidu.com"; String strB="www"+info+"com";// Stored in the runtime constant pool System.out.println(strA==strB);//falseThis is because info It's a variable. , The contents of variables can be modified , The program is not sure when it is loaded info What is it . So when you connect strings , I don't think StrB The structure of is the desired end result .
边栏推荐
- 提取系统apk
- Reproduction of an implant found by Kaspersky that writes shellcode into evenlog
- Pycharm student's qualification expires, prompting no suitable licenses associated with account solution
- CTS RTS RX TX in serial port flow control UART (direct communication between serial port module and MCU)
- Why is the frame rate calculated by opencv wrong?
- [opencv450 samples] read the image path list and maintain the proportional display
- RepOptimizer: 其实是RepVGG2
- Beacon realizes asset management and indoor positioning based on 5.2 ultra-low power Bluetooth module efr32 (bg22ax)
- What is Unified Extensible Firmware Interface (UEFI)?
- [opencv450 samples] create image list yaml
猜你喜欢

Uni app -- listen for the exit of the return key

转载: QTableWidget详解(样式、右键菜单、表头塌陷、多选等)

漏刻有时API接口实战开发系列(13):小鹅通云服务PHP-API二维数组传参解决方案

#23class介绍

The first public available pytorch version alphafold2 is reproduced, and Columbia University is open source openfold, with more than 1000 stars

Meta universe standard forum established

hiberate核心API/配置文件/一级缓存详解

YUV444、YUV422、YUV420、YUV420P、YUV420SP、YV12、YU12、NV12、NV21
![Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]](/img/3a/fb3bfe673db5123e3124404f3905c0.png)
Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]

When are the three tools used for interface testing?
随机推荐
UE4_UE5结合offline voice recognition插件做语音识别功能
毕业旅行 | 伦敦5日游行程推荐
go中全类型等值判断解析&综合汇总
转载: QTableWidget详解(样式、右键菜单、表头塌陷、多选等)
golang Make a list of intervals with sequential numbers
做接口测试,这3种工具到底什么时候用?
关于go中资源泄漏/goroutine泄漏/内存泄漏/CPU打满等情况分析
记一次beego通过go get命令后找不到bee.exe的坑
hiberate实体类CURD、事务操作汇总
#23class介绍
ACM. HJ16 购物单 ●●
CSDN force value
Idea auto generator generates constructor get/set methods, etc
C. Planar Reflections-CodeCraft-21 and Codeforces Round #711 (Div. 2)
Fegin client entry test
Once beego failed to find bee after passing the go get command Exe's pit
Pointer strengthening and improvement
Implementation of importing vscode from PDM
【2023校招刷题】番外篇1:度量科技FPGA岗(大致解析版)
【opencv450-samples】inpaint 使用区域邻域恢复图像中的选定区域