Possible Duplicate:
Exception in thread “main” java.lang.NoSuchMethodError: main
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
}
}