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
Svetlanka [38]
3 years ago
8

Write a public static method named evens that takes in 1 argument int a, and returns a String containing all positive even numbe

rs with each separated by a comma from O up to that number inclusive if it is also even
Remember if the argument is odd not to include it in the output
Remember there should be no trailing comma after the values
If the argument a is negative return a String that says "NONE!
(Do not print the String)
Example evens(5) String returned by method. 0.2.4
Example evens(8) String returned by method. 0.2.4,6,8
Example evens (9) String returned by method 0.246,8
Example evens(-5), String returned by method: NONE
Example evens(O) String retumed by method 0
Example evens(1) String returned by method 0
Computers and Technology
1 answer:
topjm [15]3 years ago
4 0

public class JavaApplication48 {

   public static String evens(int a){

       String txt = "";

       if (a < 0){

           return "NONE!";

       }

       else if(a%2 == 1){

           a -= 1;

       }

       for (int i = 0; i <= a; i+=2){

           if (i < a){

               txt += i+",";

                       }

           else{

               txt += i;

           }

       }

       return txt;

   }

   public static void main(String[] args) {

       System.out.println(evens(1));

   }

   

}

I hope this helps!

You might be interested in
Angela works for an identity protection company that maintains large amounts of sensitive customer information such as usernames
aksik [14]

Answer: (B) An insider

Explanation:

 According to the question, an Angela is an insider as she maintain all the sensitive and confidential information of the customer like the password, username,SSN (Social security number) and the personal information.

Angela and her co-worker has the right for using the customer sensitive information and data. An insider is the person who keeps all the sensitive information of the organization or company.

5 0
3 years ago
A network administrator has been tasked with configuring access to the Internet for about 50 computers. The administrator has be
scoundrel [369]

Answer:

Proxy Server.

Explanation:

An administrator was given the responsibility of customizing Internet connection for around the numbers of computer systems. He stated the admin that those Internet connections need to go through a system connected to the internet because otherwise inbound and outbound traffic can still be examined but only that systems should have a Web address identified.

So, the admin configured Proxy Server because only certain systems have been identified the following address to the internet.

3 0
3 years ago
___ refers to the use of key performance indicators to monitor performance of the entire supply chain, including sourcing, plann
Komok [63]

Answer:

Supply chain analytics

Explanation:

-Supply chain analytics refers to analyzing data using different tools that allow to evaluate the performance of the supply chain and make decisions.

-Supply chain strategy refers to the plan the company designs to take the products from suppliers to distributors.

-Supply chain visibility refers to the company being able to know where the inventory is when it is moved from the producer to the destination.

-Supply chain optimization refers to everything the company uses to have the best supply chain operation possible.

-Supply chain integration is when all the steps of the process involved in manufacturing a product and getting it to its final destination are integrated.

According to this, the answer is that supply chain analytics refers to the use of key performance indicators to monitor performance of the entire supply chain, including sourcing, planning, production, and distribution.

7 0
3 years ago
Consider the following code:
Volgvan

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

8 0
2 years ago
To change the tab order in which fields are encountered on a form, click the Tab Order button on the ____ tab. Question 1 option
ludmilkaskok [199]

Answer:

The answer is "the Design tab".

Explanation:

The Design tab includes forces act, which can be used for the development, change, modification, measurements, or analysis of geometric, and for cut, copy, and paste design objects it will use Clipboard orders. It is used to defines the sequence whereby any user may organize information during the creation of even a Database server, that's why the design tab adjusts the sequence wherein the field is found within a form.

6 0
3 years ago
Other questions:
  • Today, air travel allows large numbers of people to move quickly over long distances. Which of the following is a likely effect
    8·1 answer
  • How long does it take to wire a house?
    14·2 answers
  • How many seconds are required to make a left turn and join traffic?​
    11·2 answers
  • What defines "print media"? It is media that includes words and text rather than video, such as many blogs. It is media that is
    8·1 answer
  • When including multiple images in a report, it may help to create a _____ on each image so you can cross reference them througho
    11·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • A hardware compatibility list recommends striping with double parity as storage for an application. In a test environment, a tec
    13·1 answer
  • Question # 1 Multiple Select Which of the following shows the assignment of a string to a variable? Select 3 options. answer = "
    7·2 answers
  • (Please answer both parts, please)
    8·2 answers
  • An analog video is a video signal transmitted by an analog signal, captured on a (blank)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!