Article View: borland.public.jbuilder.java.language
Article #16873Re: JBuilder question
From: Greg Hamer
Date: Mon, 11 Jan 1999 00:00
Date: Mon, 11 Jan 1999 00:00
42 lines
1719 bytes
1719 bytes
I entered bug for it, thanks. Apparently the debuggers inspector does not
notice that the first varialbe i is no longer in scope.
Victor Batorowicz wrote:
> Hello Everyone
> I have a following question re. JBuilder 2.0 Prof. I am in a process of
> learning java and I entered and compiled the following program:
>
> package c04;
> public class BreakAndContinue {
>
> public static void main(String [] args)
> {
> for(int i = 0; i < 100; i++)
> {
> if(i == 74)
> break;
> if(i % 9 != 0)
> continue;
> System.out.println(i);
> }
> int i = 0; <================== PROBLEM HERE: no
> initialization. "i" remains == 74
> // an infinite loop
> while(true)
> {
> i++; <================== PROBLEM HERE: no
> incrementing. "i" == 74
> int j = i * 27;
> if(j == 1269) break;
> if(i % 10 != 0) continue;
> System.out.println(i);
> }
> }
> }
>
> I have described the problems in the code. It only happens when I step
> through this program with JBuilder 2.0. It works correctly with
> VisualAge for Java 2.0. Is this a bug in JBuilder 2.0 Professional?
> Thanks in advance for an answer.
> Victor
Technical Details
Message-ID:
<369AA907.3764C40B@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<369A3594.91D43D27@mmm.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7d5713ac710920b7 X-Google-Attributes: gidf74b3,public From: Greg Hamer <ghamer@inprise.com> Subject: Re: JBuilder question Date: 1999/01/11 Message-ID: <369AA907.3764C40B@inprise.com> X-Deja-AN: 431477139 Content-Transfer-Encoding: 7bit References: <369A3594.91D43D27@mmm.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language