View Single Post
  #7 (permalink)  
Old 01-22-2008, 05:19 AM
gibsonrocker800's Avatar
gibsonrocker800 gibsonrocker800 is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 143
gibsonrocker800 is on a distinguished road
Send a message via AIM to gibsonrocker800
well you could use a while loop until the number is between 20.

Code:
boolean done = false; while(!done) { int sec = cal.get(Calendar.SECOND); int sec2 = sec / 3; int sec3 = Math.round(sec2); if(sec3 >= 1 && sec3 <= 20) done = true; }
Now, it does the process until the final number is between 1 and 20.

Does this help?
__________________
//Haha javac, can't see me now, can ya?
Reply With Quote