Sunday 15 April 2012

variables - What's the difference between a modified method parameter and that of a copy of it in Java? -


Is there any difference between these two methods?

  Public Long Save Model (model model) {Model.setUpdated (new date ()); Long id = dao.save (model); Return id; }   

and

  public long-standing model (model model) {model m = model; M.setUpdated (new date ()); Long id = dao.save (m); Return id; }    

Not from attitude of behavior, and walking will show both equally.

Second, from a readability point, the IMO is a bit misleading because an implication is being "interesting" when it is not.

No comments:

Post a Comment