[This was composed without seeing the last three replies, so sorry for the redundancy - I'm too lazy to re-edit it now for conciseness - Jim]
The
JLS says: "The method main must be declared public, static, and void." Abstract is not possible because abstract conflicts with static (and obviously private would conflict with public). Nothing is said about final, so there is no reason it can't be used. And the existing jdks do support it.
As for public being required - it is true that in actuality current jdks do seem to allow any access modifier for main(). However this violates the JLS. Well maybe "violates" is a little strong - the JLS doesn't say what the compiler or JVM must do if the method is not public. I suppose from the jdk's perspective, it's undefined, and they can choose to allow it. However, we the users have been warned against it - and if a new jdk comes along which throws an error for a private main, it's entirely compliant with the JLS. If that breaks existing code, that's our fault for writing code that violates the JLS. So on this point I'd say M & R are right, though it might be nice if they pointed out that current jdks were... misleading in this respect.
I'm moving this to Mock Exam Errata.
[This message has been edited by Jim Yingst (edited April 06, 2000).]