Topic: String对象能否改变? |
Print this page |
1.String对象能否改变? | Copy to clipboard |
Posted by: zhaof Posted on: 2004-09-03 14:45 我认为对象的值可以改变,对吗?那么String对象能否改变?请高手指点! |
2.Re:String对象能否改变? [Re: zhaof] | Copy to clipboard |
Posted by: boper Posted on: 2004-09-03 15:04 你应该说的是对象的类型是否能改变吧? |
3.Re:String对象能否改变? [Re: zhaof] | Copy to clipboard |
Posted by: zhaof Posted on: 2004-09-03 15:16 算了,这个问题我没想通,我自己想了一下,实例化以后,对象就属于一个类型了,有一天一个人问我String能否改变,值当然可以改变,但我就没有搞清楚他问的是什么能否改变! |
4.Re:String对象能否改变? [Re: zhaof] | Copy to clipboard |
Posted by: yangxp_82 Posted on: 2004-09-03 16:00 不能! |
5.Re:String对象能否改变? [Re: zhaof] | Copy to clipboard |
Posted by: dorrenchen Posted on: 2004-09-03 23:14 String is a special class. String is immutable, if you change the value, JVM creates a new object instance and old string object will be discarded. Suggest you to study and take SCJP exam, which covers most of java fundamentals. |
6.Re:String对象能否改变? [Re: dorrenchen] | Copy to clipboard |
Posted by: why Posted on: 2004-09-04 00:19 dorrenchen wrote: 敝人始终觉得 take the SCJP exam 是花枉钱, 因为付款的考试非需要就不考, 但依循考试的范围学习和做做实习题,也是挺好的 |
7.Re:String对象能否改变? [Re: zhaof] | Copy to clipboard |
Posted by: zhaof Posted on: 2004-09-04 16:21 非常感谢! appreciation for your help! |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |