检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:袁玲 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[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:18.191.203.35