Java中关于字符串的若干问题分析  

Analysis of Some Problems about String in Java

在线阅读下载全文

作  者:袁玲 YUAN Ling(School of Computer Science and Technology,Kashi University,844000,Xinjiang,China)

机构地区:[1]喀什大学计算机科学与技术学院,新疆喀什844000

出  处:《长江信息通信》2023年第10期96-98,共3页Changjiang Information & Communications

基  金:喀什大学2020年教研教改课题重点项目(KJHZ2001)。

摘  要:通过用不同的方法对字符串初始化,结合反编译分析,得到初始化方法对程序结果的影响以及常量池的分配原则。在此基础上,对Java相等性比较做了详细分析,并对equals()方法和直接使用“==”进行比较,得出引用相等性比较和对象相等性比较的区别。最后,对比String类和StringBuffer类对象在程序中的不同使用方法,从堆和栈的分配方式分析不同的原因,并针对JVM的运行性能进行比较,得出优化程序的原则。by initializing strings with different methods and decompiling analysis,the influence of initialization methods on program results and the allocation principle of constant pool are obtained.On this basis,the paper makes a detailed analysis of Java equality comparison,and compares the equals O method with the direct use of"=="to get the difference between reference equality comparison and object equality comparison.Finally,the paper compares the different methods of using string class and StringBuffer class objects in the program,analyzes the different reasons from the allocation of heap and stack,and compares the performance of JVM to get the principle of optimizing the program.

关 键 词:字符串 问题分析 JAVA 初始化 相等性比较 反编译分析 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象