About Question enthuware.ocpjp.ii.v11.2.1711 :
Posted: Fri Aug 14, 2020 12:02 pm
I don't understand why option three (It may print any combination except: a, or b, or a, b, or b, a) is the correct answer! Here is my understanding:
I know that thread execution is controller by the OS scheduler and it's impossible to guess the order of code execution of two independent threads. With that being said, option one (It may print any combination of the keys) is the correct answer because there is a possibility that the scheduler might want to execute all the code in the second thread before starting the first one.
I know that thread execution is controller by the OS scheduler and it's impossible to guess the order of code execution of two independent threads. With that being said, option one (It may print any combination of the keys) is the correct answer because there is a possibility that the scheduler might want to execute all the code in the second thread before starting the first one.