I don't fully understand why the answer is such. This is the code given on the example question:
public class Sequence
{
Sequence()
{
System.out.print("c ");
}
{
System.out.print("y ");
}
public static void main(String[] args)
{
new Sequence().go();
}
void go()
{
System.out.print("g ");
}
static
{
System.out.print("x ");
}
}
So the question is what is the output/result. And the answer is: xycg
Can anyone explain why this is so?