摘要: 场景 在实际编程中需要两个相互独立的对象A,B,对象B的初始数据和A一致。改变对象B不会影响对象A。 错误用法 User user1 = new User(); user1.setAge(18); User user2 = new User(); user2 = user1; user2.setAg 阅读全文
posted @ 2022-10-09 15:57 飞飞乐园 阅读(3948) 评论(0) 推荐(0) 编辑