title: How to get full name of an employee by joining first, middle and last name considering null in java
body: <p>Here is the employee class and I have to write a method which gives full name of the employee by concatenating <code>firstName</code>, <code>middleName</code> and <code>lastName</code> considering null and empty string.</p>
  
  <pre><code>public class Employee {
     private String firstName;
     private String middleName;
     private String lastName;
  
     // Setters and getters
  
     public String getFullName(){
         // What code should I write here
     }
  }
  </code></pre>