File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to make a Immutable Object?
Joined: Jan 30, 2009
Mar 02, 2009 21:27:52
is a immutable Object?
similarly Can we make an immutable Object in
I have read that we can make a immutable Object without providing any setter methods ?? Is this true ?
If there are no setter methods on to our Object then how can we set data initially? Is this possible if i make the setter methods as final??
If you want something you never had do something which you had never done
Joined: Jun 06, 2007
Mar 02, 2009 21:40:28
This question has been discussed many times before, try searching this forum. I have found
Asking Good Questions
Joined: Apr 15, 2008
Mar 02, 2009 22:36:23
another useful link i found earlier:
How to create Immutable class
My Techie Blog
I agree. Here's the link:
subject: How to make a Immutable Object?
How to make class immutable ?
DTO - immutable vs mutable and accessors vs public variables
Exception and Immutable
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015