Results 1 to 3 of 3
  1. #1
    HackerOfDoom is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default System.wait() or something of the sort

    Hello everyone, I'm wondering whether there is a function to pause a defined amount of time before continuing with the program.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    You may wish to look up the Thread section of the Java API, and in particular, the Thread.sleep(...) method.

  3. #3
    Join Date
    Mar 2010
    Troy Upstate New York USA (Not in New York City)
    Rep Power

    Default Easy man

    Java Code:
    Thread.sleep(<time in milliseconds you want to stop>);
    Simple as that though you might want to know about try/catch blocks as well

    Good Luck!:)
    You know that line between genius and insanity? I am told I crossed it and went around back to insanity again.

Similar Threads

  1. about wait() and notifyALL
    By denis in forum Threads and Synchronization
    Replies: 13
    Last Post: 04-22-2009, 08:28 AM
  2. Thread Wait
    By jiexx in forum Threads and Synchronization
    Replies: 1
    Last Post: 03-19-2009, 06:26 PM
  3. Using Merge Sort to sort an ArrayList of Strings
    By coldfire in forum New To Java
    Replies: 3
    Last Post: 03-13-2009, 02:03 AM
  4. How to sort a list using Bubble sort algorithm
    By Java Tip in forum Algorithms
    Replies: 3
    Last Post: 04-29-2008, 08:04 PM
  5. How to use sleep() to wait for a while
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-09-2008, 06:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts