answer.
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]
1 year ago
7

JAVA

Computers and Technology
1 answer:
avanturin [10]1 year 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
An executive in a computer software firm works with his office door closed. At the same time every hour he opens the door to see
Masja [62]

Answer: (A) Fixed interval

Explanation:

 The fixed interval schedule is the type of schedule of the reinforcement in the operand conditioning in which the the initial response are rewarded by some specific amount of the time.

The main issue with the fixed interval schedule is that the people have to wait until the reinforcement schedule get occur and start their actual response of interval. This type of reinforcement schedule occur as the output value does not posses constant value all the time.

Therefore, Option (A) is correct.

4 0
2 years ago
Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
lara [203]
Hello <span>Pouerietzach


Question: </span><span>Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
</span><span>
Answer: A, B, D, E, G

Hope That Helps
-Chris</span>
5 0
2 years ago
Read 2 more answers
Write a for loop to print each contact in contact_emails. Sample output for the given program:
Paladinen [302]

Answer:

Correct code for the above question which is written in the place of loop in the above question code:

for a,b in contact_emails.items(): # for loop to print the above items one by one.

   print(str(b)+" is "+str(a)) # print statement to print the item of the list.

Output:

  • The above code is in python language which display the output as the above question demands.

Explanation:

  • The above question code is in python language, so the for loop to prints the list is defined in the answer part.
  • The for loop syntax defined in the question part is not correct. It never gives the output which the question demands.
  • The above list defined in the question part is in the form of key-value pair which comes in the categories of the dictionary concept.
  • So to print the above list, any user needs an item function that will display the output in the key-value pair.
  • There is also needs two variables in the 'for' loop one is for key and the other is for value.

4 0
1 year ago
Ruby is creating a presentation. She wants each slide displayed at intervals of five seconds. Which feature in the presentation
andrew-mc [135]

i believe its transition

6 0
2 years ago
Read 2 more answers
Write an if statement that assigns 10,000 to the variable bonus if the value of the variable goodsSold is greater than 500,000.
aev [14]

Answer:

if(goodsSold>500000){

bonus = 10000;

}

Explanation:

A complete Java program that prompts user to enter value for goodsSold is given below:

<em>import java.util.Scanner;</em>

<em>public class num14 {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Enter goods Sold: ");</em>

<em>        int goodsSold = in.nextInt();</em>

<em>        int bonus =0;</em>

<em>        if(goodsSold>500000){</em>

<em>            bonus=10000;</em>

<em>        }</em>

<em>        System.out.println("You bonus for "+goodsSold+" is "+bonus);</em>

<em>    }</em>

<em>}</em>

3 0
2 years ago
Other questions:
  • An automobile battery, when connected to a car radio, provides 12.5 V to the radio. When connected to a set of headlights, it pr
    11·1 answer
  • List three functions that you can perform with a database that you cannot perform with a spreadsheet.
    11·1 answer
  • During which phase of web publishing would you use a text editor to enter codes that instruct the browser how to display webpage
    5·1 answer
  • Which of the following are true statements about digital certificates in Web browsers?I. Digital certificates are used to verify
    10·1 answer
  • Consider the relation Courses(C, T, H, R, S, G), whose attributes can be thought of informally as course (C), teacher (T), hour
    10·1 answer
  • System design is the determination of the overall system architecture-consisting of a set of physical processing components, ___
    6·2 answers
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
    15·1 answer
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number re
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!