Where is it legal to put a break statement? What does the break do there?
a. A break is placed in a simple (unnested) loop, to terminate the loop.
b. A break is placed in an inner block of nested blocks, to transfer control beyond the end of block the break is within.
c. A break is placed in a loop in nested loops, to transfer control beyond the end of the innermost loop the break is within.
d. A break is placed in a switch statement, to terminate the switch by transferring control beyond the end of the switch.
e. A break is placed in a loop where it restarts the loop.
a) c) d) are correct
You might also like to view...
Which of the following statements is false?
a. InputStream and OutputStream are abstract classes for performing byte-based I/O. b. Tubes are synchronized communication channels between threads. c. A filter stream provides additional functionality, such as aggregating data bytes into meaningful primitive-type units. FilterInputStream and FilterOutputStream are typically extended, so some of their filtering capabilities are provided by their concrete subclasses. d. A PrintStream performs text output. System.out and System.err are PrintStreams.
After executing the following code, what is the value of posOrNeg (assume the number currently has a value of -2)?
if (number >=1) posOrNeg = “pos”; if (number ==0) posOrNeg = “zero”; else posOrNeg = “neg”;
Unwanted, unsolicited e-mail is referred to as ________
Fill in the blank(s) with correct word
You can use a(n) ________ to produced calculated results in a report
Fill in the blank(s) with correct word