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
Irina18 [472]
3 years ago
7

JAVA

Computers and Technology
1 answer:
avanturin [10]3 years ago
3 0

Answer:

   public ArrayList onlyBlue(String[] clothes){

       ArrayList<String> blueCloths = new ArrayList<>();

       for(int i =0; i<clothes.length; i++){

           if(clothes[i].equalsIgnoreCase("blue")){

               blueCloths.add(clothes[i]);

           }

       }

       return blueCloths;

   }

Explanation:

  • Create the method to accept an Array object of type String representing colors with a return type of an ArrayList
  • Within the method body, create and initialize an Arraylist
  • Use a for loop to iterate the Array of cloths.
  • Use an if statement within the for loop to check if item equals blue and add to the Arraylist.
  • Finally return the arrayList to the caller
You might be interested in
Checking for and correcting errors may need to be done numerous during which of the following phases of the software development
qaws [65]

Answer: planning

Explanation:

3 0
2 years ago
SOMEONE PLZZ HELP ME ASAP!!
Sever21 [200]

C

because you have to re read it

8 0
3 years ago
Read 2 more answers
Before creating a brief to design a product, what is needed
castortr0y [4]

Answer:

A good design brief often begins with some information about the client and what their brand stands for. Including this helps to connect an individual project with the bigger picture. Aim to capture key points about what the company does, how big they are, and what their key products or services are.

Explanation:

A good design brief often begins with some information about the client and what their brand stands for. Including this helps to connect an individual project with the bigger picture. Aim to capture key points about what the company does, how big they are, and what their key products or services are.

8 0
3 years ago
How do you do this question?
elena55 [62]

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

4 0
3 years ago
Help? brainliest and point
stiks02 [169]

Answer: second one

Explanation:

sorry lol

7 0
3 years ago
Other questions:
  • Semiconductors are only somewhat conductive electronic components.<br><br> True or False?
    14·1 answer
  • Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an annual salary attribute. An ho
    12·1 answer
  • Three of the most important jobs of security management are to ensure _____ are organized according to sensitivity, ensure that
    10·1 answer
  • 2. (8 points) When creating the Academic Database, there were several instances of data
    11·1 answer
  • Which steps allow a user to change the column layout in the Handout Master?
    9·1 answer
  • In order to get a comprehensive evaluation of the computer programmers he managed, Justin organized a(n) __________, where he as
    11·1 answer
  • Select the correct word to complete the sentence
    11·2 answers
  • Join my FNAF fan club discord
    6·2 answers
  • Can you help me with this question please ​
    13·1 answer
  • Define CPU and its functions​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!