non-static variable reference from a static context (Java)
<p>I've searched for this problem but still not getting any solution.</p>

<p>I declared this simple program:</p>

<pre><code>public class Test{
  public abstract class Person {
      public void talk(){
        System.out.print("I am a person");
      }
      public abstract void display();
  }

  public class Student extends Person {
    public void talk(){
        System.out.println("I am a student");
    }

    public void display(){
        System.out.println("Nice to meet you");
        super.talk();
    }
  }

  public static void main(String args[])
  {
    Student s = new Student();
    s.display();
  }
}
</code></pre>

<p>but it keeps giving me the error :</p>

<p>error: non-static variable this cannot be referenced from a static context</p>

<pre><code>    Student s = new Student();
</code></pre>

<p>I've always been declaring objects that way! I don't know what's happening today. </p>

<p>I need to understand what am I doing wrong here?</p>