title: Creating a superclass and subclass with constructors - Java
body: <p>I am new to Java. I have a problem to solve, but I don't quite understand how constructors work. I understand how to create a superclass and a subclass but I don't understand the constuctors within them (or how they actually work - I have done rediculous amounts of research on constructors, but it's just not making much sense).</p>
  
  <p>I am trying to write a program that creates a superclass called Employees.  This Employee class has instance variables employeeId (which is an integer) and employeeName (which is a String).  </p>
  
  <p>The subclass is called Manager. The Manager subclass has an instance variable called employeeTitle (which is a String). It also has a method with the name of managerDetails(). ManagerDetails() is supposed to display the employeeId, employeeName, and the employeeTitle.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>package tryingoutjava;
  
  public class TryingOutJava {
  
      class Employee {
  
          int employeeId;
          String employeeName;
  
          void Employee() {
  
          }
      }
  
      class Manager extends Employee {
  
          String employeeTitle;
  
          void managerDetails() {
  
          }
      }
  
      public static void main(String[] args) {
  
      }
  }
  </code></pre>
  
  <p>I am very confused on how to set up the constructors for the superclass and the subclass, or even what a constructor really looks like. I've seen examples all over the internet, but no one actually highlights the actual part that is the constructor, or how everything is linked visually, which is what helps me learn.</p>
  
  <p>I guess I'm also having issues with understanding how to set up a method that calls on an object. If anyone has the time to help, it would greatly be appreciated. Thanks!</p>