Talk:Program name: Difference between revisions

→‎Java entry: I think it's still wrong
No edit summary
(→‎Java entry: I think it's still wrong)
Line 11:
:: Strange. It printed 'Test' yesterday when I tried it. But maybe I made a change to the code after that. I've added a body to new Object, now it works again. Anyway, the System.getProperty thing is even better. [[User:Fwend|Fwend]] 07:54, 6 August 2011 (UTC)
:::I agree, it's pointless to hardcode the class and then ask for it as a string. Thanks Fwend and Mwn3d for correcting the example. --[[User:Mcandre]]
:::I think it's still not right. The main method can be called from another class, since it's public. You could run the class Test2 which calls <code>Test.main(args)</code> in its main method. The desired output for this task would be "Test2" since that's the "script" that was run, but that example would still print "Test". --[[User:Mwn3d|Mwn3d]] 17:58, 6 August 2011 (UTC)
 
==Question on the goal of the task==
Anonymous user