salary = 0;
You declare salary as 0.
You should be passing it a value from the constructor (or make use of your setSalary()).