🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16864

Is it a problem with JBuilder 2.0...

#16864
From: batorow01
Date: Mon, 11 Jan 1999 00:00
40 lines
1794 bytes
Hello Everyone
I came across this weired behaviour of JBuilder 2.0. Here is a code:

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: i doesn't get set to 0 here!
    // an infinite loop
    while(true)
    {
      i++;         <============ PROBLEM: no effect on i !
      int j = i * 27;
      if(j == 1269) break;
      if(i % 10 != 0) continue;
      System.out.println(i);
    }
  }
}
The problem is described above (search for PROBLEM). When I debug this program
with the JBuilder 2.0 Prof. version i doesn't change at all. Also when I
increment it (i++), it continues to hold a value of 74.
This code by the way works correctly with VisualAge for Java 2.0.
Why can't I reuse the variable (i) under JBuilder environment?
Thanks in advance for your input
Victor

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <77d8ot$q6r$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a7c07b70db7585f1,start
X-Google-Attributes: gidf74b3,public
From: batorow01@my-dejanews.com
Subject: Is it a problem with JBuilder 2.0...
Date: 1999/01/11
Message-ID: <77d8ot$q6r$1@nnrp1.dejanews.com>
X-Deja-AN: 431257039
X-Http-Proxy: 1.0 x10.dejanews.com:80 (Squid/1.1.22) for client 192.28.2.15
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Mon Jan 11 16:09:16 1999 GMT
Newsgroups: borland.public.jbuilder.java.language
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)