NNTP-Posting-Date: Tue, 19 Jun 2012 20:32:42 -0500 From: Leif Roar Moldskred Subject: Re: "Small" Program Challenge. Newsgroups: comp.lang.java.programmer References: <7kIDr.12088$Bp1.3039@newsfe10.iad> <4291u795eegvb0j8b09lvqkng3hh13t336@4ax.com> <4732eeb4-9d34-4765-ba6d-c098f0528038@googlegroups.com> User-Agent: tin/2.0.0-20110823 ("Ardenistiel") (UNIX) (Linux/3.0.0-21-generic-pae (i686)) Message-ID: <2P2dnb8yuIyntXzSnZ2dnUVZ8hGdnZ2d@giganews.com> Date: Tue, 19 Jun 2012 20:32:42 -0500 Lines: 18 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-ocWkSIKvX4CpWGIaHP7oIJjccHk6TGKuKkjectSM+orhHAbc/126iHQI31PK+N12Bx0TlnuvGZ1n8Ft!CzRAoSIrCBiSW2+1NS6qfhf1EdEMNZjz54mIFE+qmMsnxXIfOkclTy5u8z0QKY+a9VDdT1wsOWE= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2475 Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail Xref: csiph.com comp.lang.java.programmer:15439 javax.swing.JSnarker wrote: > On 19/06/2012 9:01 PM, Leif Roar Moldskred wrote: >> >> As has been pointed out earlier in the thread, that's exactly what >> happens when, with Java 7, you try to start a Java program with a >> class that does not contain a valid main method. > > And as has been pointed out earlier in the thread, that contravenes the > spec, which says initialization occurs *before* invocation. I disagree that it contravenes the spec, but regardless it is an example of "real code where a static method began to be invoked and the class was still not initialized." Of course, that's assuming that we consider Java 7 to have "begun to invoke" the missing main method, but if not, the rest of your argument falls through. -- Leif Roar Moldskred