This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String and wrapper classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String and wrapper classes" Watch "String and wrapper classes" New topic
Author

String and wrapper classes

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 142
HI........
why String class and wrapper classes are immutable? and what's the reason?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44590
    
  34
Somebody else asked a similar question today: here.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44590
    
  34
The post I told you about earlier isn't as good as I thought. Sorry.

I looked up on Google and found something in Wikipedia and on IBM's website. I think you will find all you require in those links. The IBM link is better.
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

raj chiru wrote:HI........
why String class and wrapper classes are immutable? and what's the reason?

The discussion why String is Immutable found here.


http://muhammadkhojaye.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String and wrapper classes
 
It's not a secret anymore!