kiaraahquin9491 kiaraahquin9491
  • 02-09-2019
  • Computers and Technology
contestada

. What is the output of this code sequence?

for ( int i = 5; i >= 0; i-- )

System.out.print( i + " " );

System.out.println( );

Respuesta :

NanaDwumor
NanaDwumor NanaDwumor
  • 02-09-2019

Answer:

5

4

3

2

1

0

Explanation:

The boolean expression is true from i=5 to i=0. This makes it 6 times.

The System.out.print will leave cursor on same line after printing. However System.out.println() will print a blank space and move to next line. This makes output to be arranged vertically.

Answer Link

Otras preguntas

why do winds at the beach change direction between day and night?
Which activity helps develop muscular endurance?
tranmission of light signals through optical fiber
Although it seemed quite important in 1788, Amendment _______, barring the quartering of soldiers in private homes, is outdated today. A. V B. IV C. III D. II
In what way did industrialization affect the working class?
How did the Magna Carta was part of the decline of the Fuedalism. pls answer 35 pts.
Viruses and bacteria are both microscopic and can both cause disease. Viruses differ from bacteria in that all viruses
Each and every are indefinite pronouns. a. True b. False
Which of the following factors to limit population size is directly influenced by lack of food resources? a. famine b. disease c. war d. birth control
What is sublimation?