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

Choose the category of Connective used In the following example:First, the boy hit the ball. Then it flew over the fencetake away or limit a preceding ldeaO ind
Is deforestation on the Amazon rain forest necessary?
Why was natural selection an important contribution to the theory of evolution?
Mandela was eventually arrested and sentenced to death. a. True b. False
Which word in the sentence is the predicate adjective? The color of her dress was quite bright. A. bright B. quite C. dress D. her
Meghan is building a fence around her garden .The garden is a rectangle 12 feet long and 24 feet wide. She wants to put a post up at each corner and every 3 fee
in order to finance their trip to the new world, the pilgrims had to form a joint-stock company. true or false
All of the following make up the big three credit reporting agencies EXCEPT: A: Equifax B: TransUnion C: Experian D: Federal Reserve
i need a complex sentence for exploration
and i want ginuses Which word in the sentence does the underlined adverbial phrase modify? A tiny mouse quickly scurried through the farmer's barn. underl