1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Crazy boy [7]
3 years ago
10

How many times is the text "Let's have fun with Java." printed when this code snippet is run? int i = 0; do { System.out.println

("Let's have fun with Java."); i++; if (i % 2 == 0) { i = 10; } } while (i <= 10);
Computers and Technology
1 answer:
mash [69]3 years ago
8 0

Answer:

The above code print the text at three times.

Explanation:

  • It is because the above code has one loop which executes three times. The loop executes for the value of i = 0,1 and 10.
  • when the value of i is 0 then "++i" will increase the value 1 and the text will be printed.
  • If the value of i=1, then the value of i is 2 in the second iteration and the again the text is printed, then the if condition gives the true result and the value of i will be 10.
  • Then the loop executes for the last time when the value of i is 10.Then the value will be 11 because of the increment operator and the text will be printed for the third time.
  • Then the while loop is not true for the 11 value of i and the loop will get terminated.
You might be interested in
Why are my images blocked on brainly<br><br> i just see gray and on every avatar and image
o-na [289]

Answer:

they are not its just that people haven't changed their profile picture. i haven't yet lol

Explanation:

5 0
3 years ago
Read 2 more answers
Debug
Snowcat [4.5K]
Wait what’s the question tho??
6 0
3 years ago
Instructions
marta [7]

Answer:

Explanation:

5 0
3 years ago
HAS ANYONE SEEN THIS FROM BRAINLY BEFORE
FromTheMoon [43]

Answer:

yes that's what happened to me!

Explanation:

4 0
3 years ago
Read 2 more answers
What command do you use to increase or decrease the view of a selected cell or range of cells to fill the excel window area for
kap26 [50]

Zoom to selection is the command that should be used to increase or decrease the view of a selected cell or range of cells to fill the excel window area for better visibility

I hope this will help you.

7 0
3 years ago
Other questions:
  • Which is the output of the formula =AND(12&gt;6;6&gt;3;3&gt;9)
    6·1 answer
  • Who<br> invented the term “debugging”?
    14·2 answers
  • ________ employees state-of-the-art computer software and hardware to help people work better together.
    15·1 answer
  • How are envelopes and letterheads different
    7·1 answer
  • Importance of type casting in programming ​
    5·1 answer
  • What are the names of different types of tablets<br>​
    13·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • State the function of the <br> BIOS,​
    11·1 answer
  • Two strategies for keeping your files in sync
    6·1 answer
  • Hi there! I am writing a code to make a square using a drone, however I’m having trouble doing so. The website that I’m writing
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!