File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes make a clone when you are  passing a mutable object   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "make a clone when you are  passing a mutable object   " Watch "make a clone when you are  passing a mutable object   " New topic
Author

make a clone when you are passing a mutable object

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
when you were passing a mutable object , make a clone of it and send it in the setter method.


I didn't understand the above statement , How a User can change the Object that is passed.

Please explain this , in terms of a Web Application development.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Java is a pass by value Object Oriented language, you know?

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: make a clone when you are passing a mutable object
 
Similar Threads
How to make class immutable ?
Can I clone my class like this?
Cloneable
about clone
reusability of object