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

name another career that combines science with another interest
The North Africans wanted to break the empire's monopoly(Ghana for one) on the gold and salt__? A. Songhai B. NokC. TradeD. Mines
Describe what conditions exist in water molecules to make them dipolar.
Mastering chemistry if the new ring is indeed pure platinum (density = 21.4 g/cm3), what is its mass?
What have the courts ruled about quotas as a part of affirmative action programs?
Can someone please help calculate the given expressions 199 - 199 -67 - -67 21 + -21 do i add and subtract normally
"a man drove 10 mi directly east from his home, made a left turn at an intersection, and then traveled 5 mi north to his place of work. if a road was made direc
How many subsets of three elements each exist in a set of six elements?
what is a material's ability to be dissolved in a solvent? A saturation, B solvent
Civilizations were held together largely by force." do you agree with this assessment or were there other mechanisms of integration as well?