The Artima Developer Community
Sponsored Link

Java Answers Forum
While loop

1 reply on 1 page. Most recent reply: May 30, 2006 11:53 PM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
LaDonna Houston

Posts: 1
Nickname: ladonna
Registered: May, 2006

While loop Posted: May 30, 2006 7:12 PM
Reply to this message Reply
Advertisement
How can I use a while loop to display part of a listing and then hesitate before displaying the rest of the list.


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: While loop Posted: May 30, 2006 11:53 PM
Reply to this message Reply
Probably wait for KeyBoard Input

E.g:
//  Note:  There is a log of Pseudo-Code so fill-in the blanks
//  Also things like Object should be declared the Actual
//  Object in your collection (Especially if you are using
//  java5 and Generics...
int count = 0;
while(someBagOrCollection.hasNext()){
   Object someVal = list.getElement();
   if(count == X){ //  where X is some number
      //WaitForKeyBoardInput  Google Code For this
   }else{
       System.out.println("Val At: "+count+"="+someVal);
   }
}

Flat View: This topic has 1 reply on 1 page
Topic: Newbie Previous Topic   Next Topic Topic: Possible to use JCR and Oracle stored procedures?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use