Forum Stats

  • 3,752,058 Users
  • 2,250,452 Discussions
  • 7,867,705 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