Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mike Amling Newsgroups: comp.lang.java.programmer Subject: Re: How does it know? Date: Sun, 14 Sep 2014 08:29:40 -0500 Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net aGJukL9qWGkFXhBDqPHuoQzj5nfwE9kEGMQMlsIK6ubHsJKEvn Cancel-Lock: sha1:tDXBfpSzXmgBn6ytjuaRNzBcu0Y= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:29974 On 9/12/14 10:11 AM, Knute Johnson wrote: > Given two classes: > > public class test { > public static void main(String... args) { > System.out.println("calling test1.main()"); > test1.main(); > } > } > > public class test1 { > public static void main(String... args) { > System.out.println("test1"); > } > } How did you get this to compile? Does the source actually call test1.main(args)? --Mike Amling bWFpbihqYXZhLmxhbmcuU3RyaW5nW10pIGluIHRlc3QxIGNhbm5vdCBiZSBhcHBsaWVkIHRvICgp