This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes immutable class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "immutable class?" Watch "immutable class?" New topic
Author

immutable class?

Kevin Peterson
Ranch Hand

Joined: Mar 05, 2005
Posts: 37
Could someone please give me an example of an immutable class from the J2SE 1.4.2 sdk?

Thanks, Kp
Sean Magee
Ranch Hand

Joined: Aug 23, 2004
Posts: 69
String j = " I am immutable";

All String are immutable, besides that im not sure.
[ March 06, 2005: Message edited by: Sean Magee ]
Kevin Peterson
Ranch Hand

Joined: Mar 05, 2005
Posts: 37
Thanks, i kick myself for not thinking of that example.

-Kp
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
What method in Integer do you use to change its value? And Double?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: immutable class?