Что выведет код?
Thread t = new Thread(() -> {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.print(Thread.currentThread().isInterrupted());
}
});
t.start();
t.interrupt();Thread t = new Thread(() -> {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.print(Thread.currentThread().isInterrupted());
}
});
t.start();
t.interrupt();
3
1
1