Fill the gaps to complete this code:
class ThreadLocalExample {
public static class MyRunnable implements _____ { // 1
private final ThreadLocal<_____> threadLocal = new ThreadLocal<>(); // 2
@Override
public void run() {
threadLocal.set((int) (Math.random() * 10));
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
System.out.println(threadLocal._____); // 3
}
}
public static void main(String[] args) throws InterruptedException {
MyRunnable runnableInstance = new _____(); // 4
Thread t1 = new Thread(_____); // 5
Thread t2 = new Thread(runnableInstance);
// start
t1.start();
t2.start();
// wait for threads to end
t1.join();
t2.join();
}
}