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
What type of product does amd manufacture
Vitek1552 [10]
AMD makes CPUs, GPUs, Motherboards, Graphics Cards and other computer hardware
6 0
3 years ago
Which piece of personal information do websites often require users to enter?
Tatiana [17]
<h2>Answer: <u><em>The most common type of information that a website will ask you for is a password, which is unique to that site. Eye color is irrelevant for sites since there are only about 5 possible colors for human eyes. Most of the time there is no practical use for that information.</em></u></h2>

Explanation:

<h2><u><em>Hope this helps</em></u></h2>
7 0
3 years ago
Read 2 more answers
Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns two independent sets
Zigmanuir [339]

Answer:

Check the explanation

Explanation:

CREATE PROCEDURE sp_Q1

<u><em>"at"</em></u>country1 NVARCHAR(15),

<u><em>"at"</em></u>country2 NVARCHAR(15)

AS

BEGIN

  BEGIN

      SELECT SupplierID, CompanyName, Phone, Country FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)

     

  SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products

      where SupplierID in(

      SELECT SupplierID FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)) ORDER BY SupplierID

  END

END

GO

-- Testing script.

DECLARE <u><em>"at"</em></u>RC int

DECLARE <u><em>"at"</em></u>country1 nvarchar(15)

DECLARE <u><em>"at"</em></u>country2 nvarchar(15)

-- Set parameter values here.

set <u><em>"at"</em></u>country1='UK'

set <u><em>"at"</em></u>country2='Canada'

EXECUTE <u><em>"at"</em></u>RC = [dbo].[sp_Q1]

<u><em>"at"</em></u>country1

,<u><em>"at"</em></u>country2

GO

Kindly check the attached images below to see how it looks like on a code editor.

7 0
3 years ago
The IP address is a _____ bit number.
Anika [276]

Answer: 32 bit number

Explanation:

 The IP address basically contain 32 bit number as due to the growth of the various internet application and depletion of the IPV4 address. The IP address basically provide two main function is that:

  • The location addressing
  • The network interface identification  

The IP address are basically available in the human readable format. The IPV6 is the new version of the IP address and its uses 128 bits.  

3 0
3 years ago
Who has played pokemon red, blue, or yellow on the gameboy
lisov135 [29]

Answer:

I didn't think this would be an actual question... I did- :3

3 0
3 years ago
Read 2 more answers
Other questions:
  • The computers that run the DBMS and all devices that store database data should reside in locked, controlled-access facilities.
    15·1 answer
  • "The pkill command terminates _________."
    14·1 answer
  • 2.13) A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for ea
    15·1 answer
  • What does a break statement do
    6·1 answer
  • How do you get banned? By getting reported? Or do admins watch whats posted?
    9·1 answer
  • What will you see on the next line?
    6·2 answers
  • I don't know if this is supposed to go here or art but i need help with photoshop, basically you can create whatever you want bu
    7·1 answer
  • Can someone follow my tt its c1ndy.dont.miss
    6·1 answer
  • What is a benefit of an account with interest?
    5·1 answer
  • Your client Mr. Smith has requested a reservation at Eleven Madison Park this evening for a party of 2 at 6PM. Unfortunately, th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!