How many times will the following code print out the message?
```
S t r i n g message = ” I w i l l be good ! ” ;
f o r ( i n t i = 1 ; i <= 5 ; i ++) {
f o r ( i n t j = 1 0 ; j > 0 ; j ??) {
System . out . p r i n t l n ( message ) ;
}
}
```
It will print out the message 50 times. The outer loop executes 5 times with i changing from 1 to 5 and the inner loop executes 10 times with the j changing from 10 to 1. So the total is 5 * 10 = 50.
Computer Science & Information Technology
You might also like to view...
There are many techniques for adding color to a black-and-white image to create a "colorized" effect.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
Which of the following is NOT one of the widely used browsers?
A. Firefox B. Safari C. Windows Explorer D. Google Chrome
Computer Science & Information Technology