non static method ... cannot be referenced from a static context
<p>Here is the error message</p>

<p><code>non static method hero(double,double,double) cannot be reference from a static context</code></p>

<p>Here is the class method. </p>

<pre><code>class MyMath {
  double hero(double n1, double n2, double n3)
  {
    double n4;
    double n5;
    n4 = (n1 + n2 + n3) / 2;
    n5 = Math.sqrt((n4 * (n4 - n1) * (n4 - n2) * (n4 - n3)));
    return n5;
  }
}
</code></pre>

<p>Here is the main program</p>

<pre><code>double length_of_a;
double length_of_b;
double length_of_c;
double area_of_triangle;

area_of_triangle = (double) MyMath.hero(length_of_a,length_of_b,length_of_c);
</code></pre>
