This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes accessing scheduler Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "accessing scheduler" Watch "accessing scheduler" New topic
Author

accessing scheduler

murugesan subramani
Greenhorn

Joined: Jul 02, 2001
Posts: 10
I have a
class A{
public int var_A;
public void run(){
try(){
doSomething();
Thread.sleep(130);
}catch (InterruptedException e){
}
}
}
public class demo{
private A [] a=new a[10];
public static void main(String [] args){
for(int i=0;i<10;i++){
a[i]=new a();
a[i].start();
}
}
}
now how do change the value of var_A in class A at every 625 milliseconds using a Timer.schedule method?
thanx

Muru
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: accessing scheduler
 
Similar Threads
I WANT REASON FOR THIS PROGRAM THROUGH JLS CAN ANY ONE HELP ME
mock problem
please explain why the compiler is not complaining and why the output is 0
Doubt Reg: initializing Variables with method call
What will be the output of following program? explain why?