hi, all of friends, "a class with a different main signature or w/o main method will compile. but throws a runtime error." where "w/o" main method is for what? thanks!
If you have SomeClass.java, compiled it, and then ran java SomeClass it will throw a runtime error if it does not have a main method or the signature is different from the usual public static void main(String args[])
Tha main method can be overloaded like any other method. so compiles. but for the purposes of the compiler, to run the application, it looks for the main(String args[]) method and if non is specified with the correct signature, then a runtime exception is thrown.