java

    Date: 04/26/05 (Computer Geeks)    Keywords: java

    ok, i am trying to do a simulation program in java, and it is going to run through "1pm-11pm" (not during actual time or real time either). anyways, i'm trying to get the clock thing working and so far it just keeps running through 1-1:59 over and over again.

    here is my code:

    for(int h=1; h<11; h++){
          while (h<=11){
                 for(int m=0; m<60; m++){
                     String currentTime= h +":" + m;
                 System.out.println(currentTime);
                 }
          }
                      }

    how would i get it so that it would print every minute from 1-11pm?

     

    Thanks

    Source: http://www.livejournal.com/community/computergeeks/668886.html

« Video Woes Cured! || Virtual Memory Paging File »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home