Hi there,
Just got the following question in a mock which is very unclear to me
Question 15.
Given that 6 action Listeners are added to a button, which action Listener is the first one to get its actionPerformed(), method invoked when button is pressed.
A.The first ActionListener that was added to button first gets
its actionPerformed invoked first.
B.It depends on the platform on which we are running the code.
C.A seperate
thread will be created for each actionPerformed
method to run and they run concurrently.
D.It is imposible to know which listener will be first to
get its actionPerformed invoked.
The answer given is D.
But my question is that isn't the order of the action listeners fixed ?
can u explain to me why Answer D is correct ?
thanks in advance.