Two Laptop Bag*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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?

 
jQuery in Action, 2nd edition
 
subject: make a clone when you are passing a mutable object