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]
4 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]4 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 is the purpose of reading in typography
IgorLugansk [536]

Answer:

The main purpose of typography is to make life easier for your readership by making it easier to read what you've written: It makes it possible to to quickly scan your text. It entices your readers to engage with your text. When done well, it enhances the message it presents

4 0
3 years ago
Why is this app here to help but wont let me see answers to my questions?
UkoKoshka [18]

Answer:

maybe you need to reload the page and press the little bell on the right side and u should get a notification when somebody answers your question and if that doesnt help go to your profile and press the tab (on this tab if that makes since) it should say sumin like questions you asked and u should press the ones u need the answers to

Explanation:

lmk if this helped

5 0
3 years ago
Read 2 more answers
Question 1(Multiple Choice Worth 5 points)
aleksley [76]

Answer:

b

Explanation:

it's not a c or d and now I have to make it 20 characters long so I will do this

3 0
3 years ago
Read 2 more answers
In _________, the process requests permission to access and modify variables shared with others. A) entry section B) critical se
AleksAgata [21]

In entry section, the process requests permission to access and modify variables shared with others.

<h3>What is Entry section?</h3>

Entry Section is known to be an aspect of any given process that tells the entry of a specific process.

Note that it often allows one process to enter and alter the shared variable and as such, In entry section, the process requests permission to access and modify variables shared with others.

Learn more about entry section from

brainly.com/question/1637572

#SPJ1

3 0
2 years ago
In Microsoft word you can access the blank command from the mini toolbar
Softa [21]
Your answer would be:
<span>
In Microsoft Word you can access the </span><span>insert citation command from the mini toolbar.</span>
3 0
4 years ago
Other questions:
  • Why is a cable modem classified as a digital model?
    12·1 answer
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • Submit your 300-word essay describing the equipment usedI in a well-equipped studio’s audio department and the training and expe
    8·2 answers
  • What are the details of frame transmission andreception that LAN interface handles?
    7·1 answer
  • You are trying to access the Wi-Fi network at a coffee shop. What protocol will this type of wireless networking most likely use
    11·1 answer
  • Bruh my sister does bot understand what this means
    6·1 answer
  • think about any special skills or passions you have and describe a way you might apply them to earn money.
    7·1 answer
  • Consider the following class declaration.
    6·1 answer
  • Question # 2 Multiple Select You wrote a program to compare the portion of drivers who were on the phone. Which statements are t
    6·1 answer
  • _____is used to organize and modify the properties of the current selection.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!