refactoring - Change parameter of method in java good practice -


I have a low function in java, a good example can not be, but just come to mind;)

Public Student Update Update Student (Student Degree Scholarship) {studentEntity.setName (...); StudentEntity.setAddress (...); Student student return; }

The above approach is good practice or otherwise, what will be the other option, can we store a student gap in different variables and return it and can return it . For example

  public scholarship update student (student degree student scholarship) {student degree * student = student = student; _studentEntity.setName (...); _studentEntity.setAddress (...); Return _stintentity; }  

Is that correct? How Much Accelerating Method Should Be? Please make me right if wrong! Thank you :)

There is no reason to write

  StudentEntity _studentEntity = StudentEntity;  

This is just redundant.

If you are just updating and prefer back to primarily. The second way is to create unnecessary illusions while reading the code.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -