Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: How does it know? Date: Fri, 12 Sep 2014 17:36:41 +0100 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="8d2122d2008ee80f5e54b979e3340738"; logging-data="31073"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mLhQPyq3l1bNaKLgNIRVS+rmNF9eOVao=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: Cancel-Lock: sha1:MPr3/ceKu4IwXLz+5QJcG1l+Uvc= Xref: csiph.com comp.lang.java.programmer:29953 On 12/09/14 16:36, Knute Johnson wrote: > On 9/12/2014 08:11, Knute Johnson wrote: >> The second question is, what type is test.main()? I want to be able to >> put it into a Map. > > Now that I think about it, I don't think that is possible. import java.util.*; public class TestApplication { public interface Application { void main(String... args) throws Exception; } public static void main(String[] args) { Map map = new HashMap<>(); map.put("self", TestApplication::main); } } -- ss at comp dot lancs dot ac dot uk