I understood what 1 and 3 do.But what's the purpose bof writing the classname(Foo) two times in command no. 2. Can any one explain? Thanx in advance.
I think you mistyped the name of your class i.e Foo1 instead of Foo. Anyway the following command java -ea:Foo Foo runs the program called Foo with Assertions enable only in package Foo and its subpackages. you might have a package called Foo then.
Whatever doesn't kill us ...<br />Is probably circling back for another try.<br />SCJP 1.4
Thought I'm not a professional on this particular issue, a quick search on the web found me this functionality for -ea: <cut> no arguments Enables or disables assertions in all classes except system classes. packageName... Enables or disables assertions in the named package and any subpackages. ... Enables or disables assertions in the unnamed package in the current working directory. className Enables or disables assertions in the named class <cut> -------------------- So java -ea:Foo Foo enables assertions for _class_ Foo not package, and runs the program Foo.