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]
2 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:
meriva2 years ago
5 0

Answer:

Move the duplicated code outside of the if statement

You might be interested in
What is the difference between hardware and software?
DIA [1.3K]

Answer:

Computer hardware is any physical device used in or with your machine, whereas software is a collection of code installed onto your computer's hard drive. For example, the computer monitor you are using to read this text and the mouse you are using to navigate this web page are computer hardware.

Explanation:

4 0
3 years ago
The _____ is a storage location for text awaiting pasting.
Tanzania [10]
What's your answers? 
8 0
3 years ago
Read 2 more answers
"abstraction" is often used to focus on a general case and ignore a specific instance of a problem. Given this meaning of the wo
prisoha [69]

Answer:

Abstraction is the process of removing or taking away certain characteristics to reduce or hide several very important characteristics.

In OOP (Object Oriented Programming), to increase efficiency and reduce complexity, a programmer hides certain vital data about an object. This is abstraction in programming.

For further clarification, a programmer ensures that the name given to an entity makes sense and most importantly, that it carries relevant aspects, and non essential parts are not included.

3 0
2 years ago
What is spam? a type of virus that spreads from computer to computer through a network connection a type of virus that targets p
Bas_tet [7]

Answer:

This is a pretty obvious answer.

An unwanted e-mail sent in bulk from people or organizations.

Explanation:

8 0
2 years ago
How can you tell that someone is listening to what you through your device ?
Alika [10]

Answer:here are some signs to look out for: Background noise. As with mobile devices, background noise whilst on a call is a sign that somebody else could be listening. Listen out for static, buzzing or clicks on the line.

Explanation:

6 0
2 years ago
Other questions:
  • What new information, strategies, or techniques have you learned that will increase your technology skills? Explain why its impo
    7·1 answer
  • Who invented the Graphical User Interface (GUI)?
    5·1 answer
  • All of these are required categories on a safety data sheet except
    14·2 answers
  • To increase the view of a document on the screen, use the _____. View icon Zoom slider full-screen reading boldface font
    9·1 answer
  • World Book is a/an A. Social media platform. B. Textbook. C. Almanac. D. Encyclopedia.
    7·2 answers
  • You are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left
    12·1 answer
  • [30 points, will mark Brainliest] Which of the following is the lowest hexadecimal value? Explain why. Options to chose; F2, 81,
    9·1 answer
  • . Write a function sumLastPart which, only using list library functions (no list comprehension), returns the sum of the last n n
    6·1 answer
  • Identify and explain 4 traditional (old ways) marketing approaches used by University uses in reaching
    7·1 answer
  • Question 6 options: This is a category or partitioned group of the small units of a programming language include its numeric lit
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!