aspose file tools*
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
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?
 
Similar Threads
Java
equals() and ==
Is the Math class considered immutable?
Math class immutable
How to make a class immutable??????????