Exforsys
+ Reply to Thread
Results 1 to 2 of 2

Thread Handling

This is a discussion on Thread Handling within the Java forums, part of the Programming Talk category; I am just starting my hands on threads in Java. I want to mention that only one thread should execute ...

  1. #1
    priyaraji is offline Member Array
    Join Date
    Apr 2006
    Answers
    52

    Thread Handling

    I am just starting my hands on threads in Java. I want to mention that only one thread should execute the method at a time. Is this possible. How can I do this.


  2. #2
    pushkarmundhare is offline Software Developer Array
    Join Date
    Feb 2007
    Location
    Pune
    Answers
    2

    Smile Yes u can....

    Quote Originally Posted by priyaraji View Post
    I am just starting my hands on threads in Java. I want to mention that only one thread should execute the method at a time. Is this possible. How can I do this.

    U can Do that. For execution of only one Thread special methode given by the JAVA that is " SetPriority " . U can set the Priority of the Thread. For that priority Only the specific Thread will be Executed. And start that Thread in for( ; ; ) Loop, call the Thread.sleep(); outside that loop. So that Loop never end and Thread doesn't stop.
    Try this.... By using this u can do the prg. of Moving Banner also.


Latest Article

Network Security Risk Assessment and Measurement

Read More...