
- Forum
- Programming Talk
- Java
- Thread Handling
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 ...
-
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.
-
03-22-2007, 05:37 AM #2
- Join Date
- Feb 2007
- Location
- Pune
- Answers
- 2
Yes u can....
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.

Reply With Quote






