, , . , , new PeriodicChecker().
, , :
-, . , , , . , .
-, , , , , , :). , start() . run(), , , run() .
, , -, - Thread, Runnable. , .
, , , :
public class Main {
public static void main(String[] args) {
new Thread(new Runnable() {
@Override
public void run() {
while(true) {
System.out.println("Thread is doing something");
Thread.sleep(5000);
}
}
}).start();
}
}