Control Structures Quiz

By Mickey Arnold
Last updated 10 months ago
4 Questions

What will the output of this control structure?

int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);

What will the output of this control structure?

int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);

What will the output of this control structure?

int loopCounter = 0; do { out.println(); loopCounter++; } while (loopCounter < 3);

What is the output of this control structure?

int resultOperation = (firstOperand > secondOperand) ? (7 - Math.min(4, 2)) : -12; System.out.println("Step 3 value: " + resultOfTernaryOperation);