Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing scheduler

 
murugesan subramani
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic