Here is a question in one of the mock exams:
If you call the interruped() menthod of a thread object twice, the second call always
But the API for public static boolean interrupted() says :
Tests whether the current thread has been interrupted. The interrupted status of the thread is cleared by this method. In other words, if this method were to be called twice in succession, the second call would return false
(unless the current thread were interrupted again, after the first call had cleared its interrupted status and before the second call had examined it).
Can anybody clarify please?