Creating a Java Timer and a TimerTask?
问题 I'm new to Java and I'm trying to set a simple timer, I'm familiar with set_interval , because of experience with JavaScript and ActionScript, I'm not so familiar with classes yet so I get confused easily, I understand that I need to set a new Timer , and then set a TimerTask , but I don't get how exactly to do it even though I'm looking at the documentation right now.. So I created an Applet, and that's my init method: public void init() { TimerTask myTask; Timer myTimer; myTimer.schedule