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
What setting in Word keeps single lines of a new
Gre4nikov [31]

Answer:

C (Window/Orphan control)

Explanation:

An "orphan" in formatting is a single line of text that is left alone/separated from the rest of the paragraph. Orphan control prevents this from happening by keeping lines together.

3 0
3 years ago
A tablet computer is a low-cost, centrally managed computer with no internal or external attached drives for data storage.
Norma-Jean [14]

Answer: False

Explanation: Tablet computer is a type of the smartphone which is portable and has computer functions. It can be used for the data accessing, videos, pictures etc. They also have a internal storage for the storing of the data.So, the statement given is false.

Thin client is the device that persist these features mentioned in the question.It is a small computer without fan and any hard-drive for the storage.It is device that has a connection along with a network,.

5 0
3 years ago
2. You turn on your Windows 7 computer and see the system display POST messages. Then
Anton [14]
The monitor would definitely be the problem in this scenario.
7 0
3 years ago
When do you use a for loop?
AleksandrR [38]

Answer:

You use a for loop when you know how many times you want to run the loop

Explanation:

if you dont know, use a while loop

6 0
3 years ago
Read 2 more answers
Which of formula contains an absolute cell reference?
svet-max [94.6K]
Which formula contains an absolute cell reference? =SUM($B$7:$B$9)
3 0
3 years ago
Other questions:
  • If r is an instance of the above Person class and oddNum has been declared as a variable of type boolean, which of the following
    8·1 answer
  • Computing devices translate digital to analog information in order to process the information
    8·1 answer
  • Different organizations implement different Information Systems base on their core business operations. explain
    14·1 answer
  • Rounding up and down for 389,422
    7·1 answer
  • NAT is able to stop ________. Group of answer choices a) scanning probes sniffers from learning anything about the internal IP a
    8·2 answers
  • Identify a characteristic of electronic meeting systems.
    10·1 answer
  • Does anybody know how to unlock websites from school computer
    7·1 answer
  • What is the answer 11100+01010​
    8·1 answer
  • Policies and procedures set by companies are established to :
    15·1 answer
  • which of the following devices and and receive information from other device? a parallel port B serial port C video port d both
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!