Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: BlueJ don't know what i did wrong Date: Fri, 22 Feb 2013 10:50:01 -0500 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <638ed624-9eba-44eb-bcbf-68466e5bb5f1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 22 Feb 2013 15:49:03 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="18088"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JCgDP7x+ug0Lta0zxvLEI" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: Cancel-Lock: sha1:TSp9t7xAw2O/mPKX1HnwApe8Tao= Xref: csiph.com comp.lang.java.programmer:22449 On 2/22/2013 10:24 AM, Joerg Meier wrote: > [...] > Or alternatively you can wait for the US crowd to wake up, there's a bunch > of posters here who honestly seem to go through every kind of code no > matter how horrible just so they can post a reply. Me! Me! Oooh goody goody -- a chance to post a reply! :) One difficulty with figuring out the problem is that we don't know how the code was run. There's a class with a constructor (which really should be redesigned along the lines Joerg suggests) and a method, but we haven't seen the code that calls the method, so we don't know what argument values are used. That's important, because it looks like the method loops until the `p' sum grows as large as the PunkteproSpieler value. If that value is too large all the nochda[] values might decrease to zero -- and thereafter the method would just keep looping and looping forever, looking for a non-zero nochda[k] that it will never find. On your next attempt please provide not only the code of the class, but also the code that uses it. At the very least, tell us what values PunkteproSpieler and Spielerzahl have when the method is called. -- Eric Sosman esosman@comcast-dot-net.invalid