Originally posted by sumaraghavi ragha:
Hi
I run the above code.It's giving the following error
C:\Program Files\Java\jdk1.6.0_06\bin>java Test
Exception in thread "main" java.lang.NoSuchMethodError: main
Thnaks in advance
For running the program , you need to have a main method in it..The JVM will look for a main method with the specified signature, as a point of entry..
Try this out...
class Test {
public static void main(
String[] args)
{
doStuff();
}
static boolean doStuff() {
for (int x = 0; x < 3; x++) {
System.out.println("in for loop");
return true;
}
return true;
}
}