java - String changes to null -


Good morning, I am using the following constructor code and for some reason the "status" variable is set to empty every time The new object is created.

This is my class code

  public class employee {name of private string; Private entity ID number; Private string section; Private string position; Public employee (string name, string off, string position, id id) {name = name; Department = departure; Posi = Status; IdNumber = ID; }}  

And this is the line I am using to create an object.

  Employee Emmaire = new employee ("Susan Meyers", "Accounting", "Vice President", 478 99);  

should be

position = posi;

no more

posi = position;

Here you have an empty variable ( position ) with an irreversible parameter ( posi ).


Comments