getting "cannot make a static reference to the non-static method" error, but I haven't declared the method I'm calling from as static
<p>When I try compile I'm getting the error:</p>

<blockquote>
  <p>cannot make a static reference to the non-static method getId() from the type Doctor.</p>
</blockquote>

<p><code>Doctor</code> is a sub-class of <code>Staff</code>. I get the same error when I replace <code>Doctor</code> with <code>Staff</code> in the code. I understand that I can't substitute a super-class for a sub-class so that's why <code>Staff</code> wont work, but in my <code>Database</code> class, I haven't declared anything as static so I don't understand why or how it is static and why I'm getting that error.</p>

<p>This is my database class</p>

<pre><code>import java.util.ArrayList;


public class Database
{
String id;

private ArrayList&lt;Staff&gt; staff;

/**
 * Construct an empty Database.
 */
public Database()
{
    staff = new ArrayList&lt;Staff&gt;();
}

/**
 * Add an item to the database.
 * @param theItem The item to be added.
 */
public void addStaff(Staff staffMember)
{
    staff.add(staffMember);
}

/**
 * Print a list of all currently stored items to the
 * text terminal.
 */
public void list()
{
    for(Staff s : staff) {
        s.print();
        System.out.println();   // empty line between items
    }
}

public void printStaff()
{
    for(Staff s : staff){


        id = Doctor.getId();//This is where I'm getting the error.


        if(true)
        {
            s.print();
        }
    }
}
</code></pre>

<p>This is my Staff class.</p>

<pre><code>public class Staff
{
    private String name;
    private int staffNumber;
    private String office;
    private String id;

/**
 * Initialise the fields of the item.
 * @param theName The name of this member of staff.
 * @param theStaffNumber The number of this member of staff.
 * @param theOffice The office of this member of staff.
 */
public Staff(String staffId, String theName, int theStaffNumber, String theOffice)
{
    id = staffId;
    name = theName;
    staffNumber = theStaffNumber;
    office = theOffice;
}

public String getId()
{
   return this.id;
}


/**
 * Print details about this member of staff to the text terminal.
 */
public void print()
{
    System.out.println("ID: " + id);
    System.out.println("Name: " + name);
    System.out.println("Staff Number: " + staffNumber);
    System.out.println("Office: " + office);

}
</code></pre>

<p>}</p>
