Results 1 to 4 of 4
  1. #1
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default While loops with parameters based on methods from other classes

    Can you have a while loop that keeps executing the loop until a method in another class has been carried out?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: While loops with parameters based on methods from other classes

    Quote Originally Posted by Hazza View Post
    Can you have a while loop that keeps executing the loop until a method in another class has been carried out?
    Yes, certainly you can, and in fact this is often done, but you had best be sure that the other method is called on a different thread than that which is calling the while loop. You'd also probably want to use volatile variables if any are to be shared between threads.

  3. #3
    Hazza is offline Member
    Join Date
    Oct 2012
    Posts
    64
    Rep Power
    0

    Default Re: While loops with parameters based on methods from other classes

    Thread? I don't think I have come across that term before?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: While loops with parameters based on methods from other classes

    Quote Originally Posted by Hazza View Post
    Thread? I don't think I have come across that term before?
    You'd better check out the Concurrency Tutorial pronto because you will definitely need to understand this concept well if you desire the functionality that you're asking about.

Similar Threads

  1. Replies: 2
    Last Post: 07-12-2012, 11:04 PM
  2. Replies: 8
    Last Post: 04-16-2012, 11:00 PM
  3. Creating an object based on user input parameters
    By monkeyhead in forum New To Java
    Replies: 5
    Last Post: 11-14-2011, 11:59 PM
  4. 2 same methods and parameters
    By unexpert in forum New To Java
    Replies: 6
    Last Post: 01-25-2011, 05:35 PM
  5. methods with a lot of parameters
    By syncppl in forum New To Java
    Replies: 8
    Last Post: 09-16-2009, 11:39 AM

Tags for this Thread

Posting Permissions

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