title: Non-static method cannot be referenced from static content
body: <p>I cannot compile the following code:</p>
  
  <pre><code>public class Test {
   public static void main (String [] args ){
    int a = calcArea(7, 12);
    System.out.println(a);
   }
  
   int calcArea(int height, int width) {
    return height * width;
   }
  }
  </code></pre>
  
  <p>The following error appears: </p>
  
  <blockquote>
    <p>Non-static method calcArea(int, int) cannot be referenced from static content</p>
  </blockquote>
  
  <p>What does it mean? How can I resolve that issue..?</p>
  
  <p>EDIT:</p>
  
  <p>Based from your advice, I made an instance which is new test() as follows:</p>
  
  <pre><code>public class Test {
      int num;
      public static void main (String [] args ){
          Test a = new Test();
          a.num = a.calcArea(7, 12);
          System.out.println(a.num);
      }
  
      int calcArea(int height, int width) {
              return height * width;
      }
  
  }
  </code></pre>
  
  <p>Is this correct? What is the difference if I do this...</p>
  
  <pre><code>public class Test {
   public static void main (String [] args ){
    int a = calcArea(7, 12);
    System.out.println(a);
   }
  
   static int calcArea(int height, int width) {
    return height * width;
   }
  }
  </code></pre>