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
NeX [460]
3 years ago
11

What is the best way to improve the following code fragment? if ((counter % 10) == 0) { System.out.println("Counter is divisible

by ten: " + counter); counter++; } else { System.out.println("Counter is not divisible by ten: " + counter); counter++; } Move the duplicated code outside of the if statement Shorten variable names Move the brackets to save several lines of code Add semicolons after the if condition and the else reserved word
Computers and Technology
1 answer:
meriva3 years ago
5 0

Answer:

Move the duplicated code outside of the if statement

You might be interested in
What type of device is characteristic of an enterprise environment?
Nitella [24]
A workstation used at an engineering firm.
8 0
3 years ago
Mike wants to capture some images of his application as it appears on the screen. In order to do this, Mike needs to know how to
Stells [14]
D is the best answer
I hope it’s work
5 0
2 years ago
3. Answer the following in one sentence: (1*6=6 )
Whitepunk [10]

Answer:

A

Explanation:

I did it

7 0
2 years ago
Read 2 more answers
What types of computers where made in the 2000s?
Margarita [4]

Answer:

Mac was made in 2000!!!!!!!!

6 0
2 years ago
In traditional programming, probably the most often used error-handling outcome was to ____.
Harman [31]

In traditional programming, doubtless the error-handling outcome that is most often used was to terminate the program<span> in which the offending statement occurred, or at least to terminate the module (if not the entire program) in which the offending statement occurred.</span>

3 0
3 years ago
Other questions:
  • Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k
    10·1 answer
  • katherine has work experience of seven years as a graphic designer and photographer. she wants to now redirect her career to web
    5·2 answers
  • Which directory holds most of the system log files?
    8·1 answer
  • What does Intel mean in this phrase(collect all intel).
    9·2 answers
  • Which information technology job has the lowest predicted 10-year growth? computer programmer software developer computer suppor
    13·1 answer
  • When installing conduit for a mast service, what type of conduit should you use?
    9·2 answers
  • Wide area networks are defined by their ability to
    14·2 answers
  • Select the correct answer.
    11·1 answer
  • Which of the following screen elements is a horizontal bar that displays at the
    8·1 answer
  • joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!