1Timer timer = new Timer();
2timer.schedule(new TimerTask() {
3@Override4publicvoidrun(){
5//what you want to do6 }
7}, 0, 1000);//wait 0 ms before doing the action and do it evry 1000ms (1second)89timer.cancel();//stop the timer
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content