Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class Task3 {
public static void main(String[] args) {
Runnable runnable = new Runnable() {
public void run() {
// task to run goes here
System.out.println("Hello !!");
ScheduledExecutorService service = Executors
service.scheduleAtFixedRate(runnable, 0, 1, TimeUnit.SECONDS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment