Path: csiph.com!news.bbs.geek.nz!.POSTED.agency.bbs.geek.nz!not-for-mail From: Kiwi User (Kiwi User) Newsgroups: comp.lang.java.programmer Subject: Re: Please help Date: Thu, 07 Dec 2017 21:22:42 +1200 Organization: fsxNet Usenet Gateway | bbs.geek.nz/#fsxNet Message-ID: <579199865@f38.n261.z1.binkp.net> References: <2264931732@f38.n261.z1.binkp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: news.bbs.geek.nz; posting-host="M6YmRdZYyc42DJk0lNlt/X4dpP4dzvceBNabSmESN3E"; logging-data="25937"; mail-complaints-to="abuse@news.bbs.geek.nz" User-Agent: VSoup v1.2.9.47Beta [95/NT] X-MailConverter: SoupGate-Win32 v1.05 X-Comment-To: Eric Douglas Xref: csiph.com comp.lang.java.programmer:37767 On Thu, 07 Dec 2017 10:14:09 -0800, Eric Douglas wrote: > On Thursday, December 7, 2017 at 1:04:56 PM UTC-5, Kiwi User wrote: >> > Did you compile this with your BlueJ to see your error? >> > All I'm seeing wrong with this is your getter method forgetting to >> > declare the return type. >> > >> There's an error in the constructor too: no double quotes round the >> String constant. >> >> >> > That is actually a runtime error. It does look like the instructions > say to initialize it to the string constant "X00000" while this code is > initializing the String variable to the String value of the int variable > X00000 which is not assigned. Nope. Line 11 gives a compile-time error (javac 1.8.0_91). Try it yourself. -- Martin | martin at Gregorie | gregorie | dot org