zahir hussain
zahir hussain

Reputation: 3739

program of single thread with timer in java

any simple program for single thread with timer in java.

that thread will run with particular time.

i am new to this thread.

thanks in advance

Upvotes: 0

Views: 455

Answers (1)

SimonC
SimonC

Reputation: 6728

You'll want a ScheduledExecutorService, which can be obtained from one of the static factory methods on Executors.

Check out:

http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/util/concurrent/Executors.html

http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/util/concurrent/ScheduledExecutorService.html

Upvotes: 1

Related Questions