Talk:Modulinos: Difference between revisions

Fixed nametag
(Fixed nametag)
Line 104:
:No, your Java example seems wrong to me. The current task description says to ''"to execute a main() function only when a program is run directly"''. So call MainClass.main() only when running MainClass? Your example is wrong because it also calls MainClass.main() when running TestClass? --[[User:Kernigh|Kernigh]] 02:10, 9 March 2011 (UTC)
 
:Mwn3d, see the current Java example, "ScriptedMain". The comments above about "library as an executable" are on point. The desired behavior is that the ScriptedMain class runs a main method, Test imports ScriptedMain, and Java does not call ScriptedMain.main() when Test is run. --[[User:KernighMcandre|KernighMcandre]]
 
==What ''is'' an "Executable library"==
Anonymous user