Okay, sometimes I don't get Enthuware's rationale....
Some questions trick you by requiring you to think in the most literal terms and then there's this question:
What will the following code print?
A million 1
A million 2
Compilation error because of //1
Compilation error because of //2
Compilation error because of //3
Compilation error because of //1 and //3 <-- This is the correct answer according to Enthuware
Yes, there are compilation errors on //1 and //3 but that's not what the question is asking. It's asking "what will the following code print?" In the most literal sense, wouldn't all of the answers be incorrect because the compiler spits out multiple lines? From what I can tell, it never reaches //3 because it stops after //1 is executed.
Wouldn't //1 be more appropriate in this case? Technically, it's the closest to what the compiler actually prints.
Some questions trick you by requiring you to think in the most literal terms and then there's this question:
What will the following code print?
A million 1
A million 2
Compilation error because of //1
Compilation error because of //2
Compilation error because of //3
Compilation error because of //1 and //3 <-- This is the correct answer according to Enthuware
Yes, there are compilation errors on //1 and //3 but that's not what the question is asking. It's asking "what will the following code print?" In the most literal sense, wouldn't all of the answers be incorrect because the compiler spits out multiple lines? From what I can tell, it never reaches //3 because it stops after //1 is executed.
Wouldn't //1 be more appropriate in this case? Technically, it's the closest to what the compiler actually prints.