« Salut Amigo ! »

  Questions d'entretien
1 Nommez tous les états d'un objet Thread.
2 Dans quels états un thread peut-il basculer lorsqu'il entre dans un bloc synchronisé ?
3 Dans quel état un thread entrera-t-il lorsque la méthode wait() sera appelée ?
4 Dans quel état un thread entrera-t-il si wait(500) est appelé ?
5 Dans quel état un thread entrera-t-il lorsque la méthode notify() est appelée ?
6 Dans quel état un thread entrera-t-il lorsque la méthode notifyAll() est appelée ?
7 Trois threads dans un bloc synchronisé appelé wait() sur un objet mutex.
Dans quel état ces threads entreront-ils si un quatrième thread appelle notifyAll() ?
8 Quelle est la différence entre join(500) et wait(500) ?
9 Quelle est la différence entre attendre (500) et dormir (500) ?
dix Dans quel état un thread entrera-t-il lorsque la méthode yield() est appelée ?