Exception in thread "main" Java.lang.NoSuchMethodError: main?
<pre><code>import java.io.*;
import java.lang.Math;
class Squr
{
  public static void main ()
  { 
   int m =10,n;
   double z = 10.4,p;
   Squr square = new Squr();
   p = (double)square.mysqrt(z);
   n = (int)square.mysqrt(m);
   System.out.println ("square root of 10 : " + n );
   System.out.println ("square root of 10.4 : "+ p );  
  }
    double mysqrt (double y)
   {
     return Math.sqrt(y);
   }
   int mysqrt (int x)
   {
     return (int)Math.sqrt(x);
   }

}
</code></pre>

<p>This code is compiling but when  we try to execute it it giving   " Exception in thread "main" Java.lang.NoSuchMethodError: main "</p>
