title: Incompatible types: possible lossy conversion from double to int return salary
body: <p>I have tried many methods but I can't fix this Problem.
  My code is </p>
  
  <pre><code>public class Employee extends Person{
    float salary;
    int yearOfStarted;
    String nationalInsuranceNumber;
  
    float getSalary(){
      return (float)salary;
    }
  
    void setSalary(float salary){
      salary = this.salary;
    }
  }
  </code></pre>
  
  <p>the Error comes at getSalary method whenever It compiles.</p>
  
  <blockquote>
    <p>error: incompatible types: possible lossy conversion from double to int return salary;</p>
  </blockquote>