Skip to content

Instantly share code, notes, and snippets.

import java.io.File;
import java.util.logging.Logger;
public class ThreadedDemo {
private static Logger logger = Logger.getLogger("demo");
// "Inner class" represents a single thread that runs forever, looking for
// a certain file to appear, then "processes it," for demo
// purposes just renaming it to another name
static class Worker implements Runnable {