Microsoft
MB6-869 · Question #36
In Microsoft Dynamics AX 2012, what is the print output of the following method? static void sampleContinueBreak() { int counter; for (counter=1;counter <= 10;counter++) { if (counter > 3 && counter…
The correct answer is C. 1 2 3 8 9. See the full explanation below for the reasoning.
Question
In Microsoft Dynamics AX 2012, what is the print output of the following method? static void sampleContinueBreak() { int counter; for (counter=1;counter <= 10;counter++) { if (counter > 3 && counter < 8) { continue; } else if(counter == 9) { break; } print counter; } print counter; pause; }
Options
- A1 2 3
- B1 2 3 8
- C1 2 3 8 9
- D1 2 3 9 10
How the community answered
(70 responses)- A13% (9)
- B4% (3)
- C80% (56)
- D3% (2)
Community Discussion
No community discussion yet for this question.