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 most indians settled in the coastal regions, the deccan plateau, and the indo-gangetic plain
Thomas Wolfe wrote very short novels. a. True b. False
which type of plant reproductive cell - spore or gamete - is better adapted for dispersing, or spreading, bryophytes and ferns to other places?
settlers came from___ to the americas seeking mainly religious freedoms in the 1600s
A patent facilitates a government-approved technological monopoly by
as water is cooled ,at what temperature do its particles become fixed on place?
If 19 more than 2 times a number is 23, what is the number?
Which of the following people was of similar status to the pope in the Middle Ages' social hierarchy? bishop vassal king knight
why did Tallahassee become the capital of the Florida territory.
An intervening opportunity is an example of a A. push factor B. pull factor C. low standard of living D. destination for periodic migration