首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

String种之intern()

2012-10-21 
String类之intern()API说明部分:When the intern method is invoked, if the pool already contains a str

String类之intern()
API说明部分:
When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.

测试1:
------------------------------------------------------------------

 基础知识,不容忽视!!! 

热点排行