Hi guys, just thought I would jump in here to see if I can get some help with this same question. I understand that the static will print first, and the go() will print last, but what I am really confused on is why the c and the y print in the order they do. They are listed in the following order:
{System.out.print ("c ");}
{System.out.print ("y ");}
but it goes to the second instruction first, hence resulting in the x, y, c, g output.
I have tried adding additional instructions as follows:
{System.out.print ("c ");}
{System.out.print ("y ");}
{System.out.print ("w ");}
{System.out.print ("z ");}
and in every case when it reaches this point, it jumps to the second line first to print whatever is there, follows on with the subsequent lines, only then returning to print the content of the first line before finishing the sequence with the go(). In this example, the output I get is x, y, w, z, c, g.
I can't understand it and I would really appreciate some help as I have tried to get to grips with it by manipulating the program a dozen ways. I am completely new to Java so go easy on me please! What am I missing/not seeing?
Thank you in advance!