Exception in thread "main" java.lang.NoSuchMethodError: main
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2496073/exception-in-thread-main-java-lang-nosuchmethoderror-main">Exception in thread &ldquo;main&rdquo; java.lang.NoSuchMethodError: main</a>  </p>
</blockquote>



<pre><code>public class m
{
    int a; //class variable


    void f1()
    {
       int b=10;
       System.out.println(a);
       System.out.println(b);
    }
}
class B
{
   public static void main(String args[])
   {
      m ob=new m(); //object created
      ob.f1(); //calling f1 method

   }
}
</code></pre>
