title: What is the best way to know if all the variables in a Class are null?
body: <p>This would mean that the class was initialized, but the variables were not set.</p>
  
  <p>A sample Class:</p>
  
  <pre><code>public class User {
  
      String id = null;
      String name = null;
  
      public String getId() {
          return id;
      }
      public void setId(String id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
  }
  </code></pre>
  
  <p>The actual class is huge that I prefer not to check if(xyz == null) for each of the variables.</p>