Анализ кода с synchronized
Условие задачи
Проанализировать код и понять, в чем может быть подвох
kotlinpublic class Incrementor {
int count = 0;
public synchronized void inc() {
if (count < 10) {
count++;
inc();
}
}
}
new Incrementor().inc();