When executing a while loop, does java constantly check if the parameter(s) are true? For example if a while loop is
while(k=7) {
Thread.sleep(5000);
}
but during the 5 seconds another thread changes k to 8, would the loop continue waiting or exit immediately?