🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how do I instantiate an int?

#19316
From: Randy Burnett
Date: Thu, 19 Feb 1998 00:00
31 lines
1266 bytes
Alex,

Try the following:

int my_int;

for(my_int=0;my_int < somevalue;my_int++)
{
.
.
.
}

Hope this helps.

Randy

Alex Humphreys wrote in message <34EC6D40.C8913D5F@sema4.com>...
>I'm trying to create a simple int variable that I can use as an index in
>a loop.  How do I declare it?  When i try the obvious (int my_int = new
>int();) I get an error saying that "class required but int found."  When
>I try running the loop without declaring the index, it tells me that
>my_int not found in class my_class.
>
>And when I doing the whole thing with Integers, I can't figure out how
>to add anything(!)--I get errors saying that the method
>+(java.lang.Integer, java.lang.Integer) not found in class my_class.
>
>What's going on here?  How can I resolve this?  Thanks!
>
Technical Details
Message-ID: <6chrn5$4pv2@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34EC6D40.C8913D5F@sema4.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,ea4f9ce85b8e382
X-Google-Attributes: gidf74b3,public
From: "Randy Burnett" <rburnett@rust.net>
Subject: Re: how do I instantiate an int?
Date: 1998/02/19
Message-ID: <6chrn5$4pv2@forums.borland.com>
X-Deja-AN: 326661110
References: <34EC6D40.C8913D5F@sema4.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: None
Newsgroups: borland.public.jbuilder.java.language