Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

Anybody know Java?

Thread Tools
 
Old Jan 20, 2004 | 12:23 AM
  #1  
nizmugen's Avatar
nizmugen
Thread Starter
Senior Member
 
Joined: Jun 2002
Posts: 1,053
Likes: 0
From: San Diego, CA
Default Anybody know Java?

If so, how do you do a conditional loop (using For, While or Do loops)?

I want the loop to go if only the input number is between 2 values.

Reply
Old Jan 20, 2004 | 12:39 AM
  #2  
jclau00's Avatar
jclau00
Senior Member
 
Joined: Sep 2002
Posts: 1,104
Likes: 0
From: bay area, cali
Default

while (variableX > 4 && variableX < 6) {

stuff u want to happen goes between these squiggly brackets

}

i think that's how it works.. sorry if it doesn't.. i am a failed cs major that hasn't programmed in over 2 years
Reply
Old Jan 20, 2004 | 12:59 AM
  #3  
So.Cal_INTEGRA's Avatar
So.Cal_INTEGRA
Registered User
 
Joined: Nov 2003
Posts: 380
Likes: 0
From: Temecula, Ca
Default

Man I took programing from java, visual basics to c++ in HS. And to tell you the truth, to this date I dont know s***. All that true = this and False = that just flew by my head.

Programing is so f***ing hard !!!!!
Reply
Old Jan 20, 2004 | 01:59 AM
  #4  
brtecson's Avatar
brtecson
pukimonster
 
Joined: Jun 2002
Posts: 9,967
Likes: 2
From: Milwaukee, WI
Default

i only studied c++, but i think its the same concept, with different syntax:

take a for loop for example..

Code:
for (initalization ; condition ; increment) {

     if (input > minimumvalue && input < maximumvalue){

                       ...insert action here......

     }

}
Reply
Old Jan 20, 2004 | 02:16 AM
  #5  
aux's Avatar
aux
More Black on Black Crime
 
Joined: Dec 2000
Posts: 37,776
Likes: 0
From: San Diego, CA
Default

i was into CS. took a java class and it was hard and changed majors h:
Reply
Old Jan 20, 2004 | 04:26 AM
  #6  
nizmugen's Avatar
nizmugen
Thread Starter
Senior Member
 
Joined: Jun 2002
Posts: 1,053
Likes: 0
From: San Diego, CA
Default

ah i figured it out...thanks guys
Reply




All times are GMT -8. The time now is 11:49 PM.