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.