Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: It doesn't like 'super' where ever I put it. Date: Tue, 12 Jun 2012 18:21:52 +0200 Lines: 48 Message-ID: References: <5d496e1f-37e1-43d2-a54c-47dacd3c3fec@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net cdS5/8hR5uXYuT5A0i/Lwwt/ntJG5E/wuk8KTUc7K3niC6go8ZBzE83mkts/qJd3k= Cancel-Lock: sha1:uChyj+jrDSlaMV5An51G/LJj850= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: <5d496e1f-37e1-43d2-a54c-47dacd3c3fec@googlegroups.com> Xref: csiph.com comp.lang.java.programmer:15224 On 12.06.2012 02:38, Lew wrote: > Stefan Ram wrote: >> Eric Sosman writes: >>> Constructor must call super() or this() before return in >>> method CalcFrame1.()V [...] (...) >>> at hand, and the compiler has no way to know which was intended. >> >> But the above is not a compiler message, but a run-time message. > > Perhaps there was a transcription error in the OP's message when they p= ut > together their otherwise quite serviceable SSCCE. I rather think the confusion now reached a degree where people loose=20 sight of compile time and runtime. :-) >> For a similar situation, I get a compiler message: >> >> |Main.java:31: error: call to super must be first statement in constru= ctor >> |public void test(){ super(); } >> >> . (This message does not actually claim that =BBtest=AB was a >> constructor, although one might read it this way.) > > Has anyone tried compiling the OP's first example? (I haven't, and won'= t.) > Perhaps there's a further anomaly in there. Yes, with Eclipse. See my posting from yesterday for Eclipse _compiler_ = (and not runtime!) error message. Repeated for convenience: > Granted, the error message is probably not the most telling. Eclipse s= ays > Constructor call must be the first statement in a constructor CalcFrame= 1.java /c.l.j.p/src line 8 Java Problem > > Which is certainly clearer. Kind regards robert --=20 remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/