Forum Stats

  • 3,838,652 Users
  • 2,262,389 Discussions
  • 7,900,723 Comments

Discussions

How to clone object for setter safety?

User_05BQK
User_05BQK Member Posts: 1 Green Ribbon

I have written some code:

when I set id "roleOp" with roleOp.setId(2), Role of User changes id = 2, I no idea. I don't want to change Role User by "roleOp" changed