This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The question asks for valid signatures for main method entry point of an application. According to answers, the following is correct : public static int main (String  arg) It appears that it doesn't work (compiles correctly, but doesn't run). Am I missing something? Thanks
i agree with Anil. the main method(which is the entry point for JVM) should not return anything and hence the return type should be void. The main method with int as return type is a valid method signature but it is certainly not the entry point. rajashree.
Oddly enough, Annmarie and I compared our "Complete Java 2 Certification" books and my copy says that the above is legal and her copy says that it is illegal. This is test yourself, chapter 1, question 3 (page 26). We have the same edition except at the bottom of the copyright page, her book says: "10 9 8 7 6 5 4 3 2 1" and mine says: "10 9 8 7 6 5 4" What do other copies of the book say about this question? BTW, we checked the errata from the web site and it didn't mention anything about this.