cant we return int from main function of a class...so the main method's signature w'd look like public static int main(String args[]), i ahve done it, but it shows a problem, NoSuchMethodError . isn't there any way to overcome this limitation???
Well, what do you expect the application to do with the int that is returned?
If you are expecting it to return as the exit code, as in a C application, then you can accomplish the same thing with using the system exit() method. The parameter passed to the exit method is the exit code.
JVM is the one that calls the main method and what will the JVM do with the int that you return. No you cannot change the method signature for public static void main(String args[])