title: Calling a Constructor without parameters
body: <p>I am trying to build a class with a constructor, mutators and accessors. Reading through books and online, I am made to learn that you can call a constructor with or without parameters. However, my case below seems not to work. I am not even able to compile without errors. It works when I use <strong>student jane = new student("")</strong>. What am I doing wrong?</p>
  
  <pre><code>Devolution.java:6: cannot find symbol
  symbol  : constructor student()
  location: class Governor
          student jane = new student();
                           ^
  </code></pre>
  
  
  
  <pre><code>public class designers {
  
     public static void main(String[] args) { 
  
      student jane = new student();
      student smith = new student("jane", "36365355", "Nairobi", "Male");
  
      System.out.println("Janes's Properties: "+jane.name() + " " + jane.nationalID() + " " + jane.county()+"  "+jane.gender());
      System.out.println("Smith's Properties: "+smith.name() + " " + smith.nationalID() + " " + smith.county()+"  "+smith.gender());
  
     }    
   } 
  </code></pre>
  
  <p>other code is below</p>
  
  <pre><code>public class student {
  
     //Private fields
     private String name;
     private String nationalID;
     private String county;
     private String gender;   
  
     //Constructor method
     public student(String name, String nationalID, String county, String gender)
     {
       this.name = name;
       this.nationalID = nationalID;
       this.county = county;
       this.gender = gender;
  
     }
  
     //Accessor for name
     public String name()
     {
       return name;
     }
  
     //Accessor for nationalID
     public String nationalID()
     {
       return nationalID;
     }
  
     //Accessor for county
     public String county()
     {
       return county;
     }
  
      //Accessor for gender
     public String gender()
     {
       return gender;
     }
  
   }
  </code></pre>