how to handle an exception when using timer
<p>I want to use timer to run a method in a period of time delayed, but the method may throw an exception which cannot be handled by run(), what should I do in this situation? the code may like below</p>

<pre><code>Timer timer = new Timer();

timer.schedule(new TimerTask() {
        public void run() {
            method() throws an exception /*the method that I want to run, which throws an exception cannot be handled in run()
        }
    }, timeToRun);
</code></pre>

<p>This kind of code could not work because run() cannot handle exceptions, so what should I do to make my method() run with exception in this case? Could somebody helps me? </p>
