I'm a Java beginner and have been futzing around with various solutions to this problem and have gotten myself kind of knotted up. I've tried with Threads and then discovered this Timer class and have messed around with it without success so far. If you could post executable code with a main method so I could see it working and start playing around from there, that would be great.
doSomething()
doSomething()
again.Probably using this: http://docs.oracle.com/javase/6/docs/api/java/util/Timer.html
This question is related to
java
timer
scheduled-tasks
Source: Stackoverflow.com