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
Rainbow [258]
2 years ago
4

Write a method called listSearch() that takes in a target string and a list of other strings. This method returns a (possibly sh

orter) list containing all of the strings from the original list that themselves contain the target string you are searching for. Check for the target string as a case-sensitive substring of every member of the list. You can either modify the provided list or create a new one.
Computers and Technology
1 answer:
Alik [6]2 years ago
4 0

Answer:

public static List<String> listSearch(String searchFor, List<String> list){

    List<String> foundList = new ArrayList<String>();

   

    for(String s:list){

        if(s.contains(searchFor)){

            foundList.add(s);

        }

    }

    return foundList;

}

Explanation:

Create a method named listSearch that takes two parameters, a String named searchFor and a String list named list

Inside the method, initialize a new String list named foundList, this will be used to hold the strings that contains the target string. Create a for loop that iterates through the list. Check if a string in the list contains the searchFor using the contains method. If it does, add the string to the foundList. When the loop is done, return the foundList.

You might be interested in
Most injury crashes in Florida happen in __________ conditions.
ivolga24 [154]

Answer:

Most injury crashes in Florida happen in dusk conditions

Explanation:

Dusk is the time of the day when the sun is setting. At this time of the day, the visibility on the roads is less. This time of the day, the number of cars on the roads is also significantly greater. This indirectly means that the possibility of most injury crashes in Florida in dusk conditions considerably increases.

The amount of tourism happening in the state is also a condition that takes part in injury crashes due to increased traffic on the roads.

7 0
2 years ago
Mavis is considering signing up for a hosted enterprise software solution for her small business. She recognizes that an advanta
babymother [125]

Since Mavis is considering signing up for a hosted enterprise software solution for her small business, an advantage of the software is <u>lower cost</u>.

A hosted enterprise software solution is typically hosted off-site and in a private server that is owned by a third party. It's vital for organizations as it can be used in managing daily business activities.

The advantages of a hosted software model include reliable backup, reduction in IT costs, scalability of computing resources, etc. It is also necessary for managing critical business processes.

Read related link on:

brainly.com/question/25526416

6 0
1 year ago
In 2–3 sentences, describe how you would change the background of a group of cell
IRISSAK [1]

Highlight the cells you would like to change. Go up and press background color. choose the color you want. and press done.

3 0
2 years ago
Read 2 more answers
Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
Tanzania [10]
Well, integrity is a must if you are reading anything. So it would be any website that has either a .edu or a .gov at the end of a URL. 

I never suggest Wikipedia for brief, since 100's of people will edit one topic at a time, the answer to what he is looking for is buried in 18 pages about one settler in the United States!
5 0
2 years ago
Read 2 more answers
Cha’relle works as an editor at a publishing house. She got her position after interviewing another editor and following that ed
yuradex [85]

She used her communication skills meaning the verbal method.

Explanation:

Because she has a natural ability to talk and communicate well with others, offering them insight on any issues they may have or anything they may be lacking or struggling with. She's a natural born healer and giver.

4 0
2 years ago
Other questions:
  • Becky is preparing a document for her environmental studies project. She wants to check her document for spelling and grammar er
    5·2 answers
  • HELP ASAP U GET BRAINLIEST
    15·2 answers
  • To gain experience of using and combing different sorting algorithms: election sort, insertion sort, merge sort, and quick sort.
    14·1 answer
  • Kelli is unable to find a shape that meets her needs which feature in PowerPoint should she use to create shapes that are comple
    8·1 answer
  • True or False: A class that implements an interface may only implement a few of that interface's method declarations
    13·1 answer
  • Suppose you are given an unknown chip which could be any one of the of the following: 7400, 7402, 7404, 7408, 7410, 7420, 7427,
    9·1 answer
  • The UML models operations by listing the operation name preceded by an access modifier. A(n) ________ indicates a public operati
    7·2 answers
  • Disk scheduling algorithms in operating systems consider only seek distances, because Select one: a. modern disks do not disclos
    13·1 answer
  • What does the binary odometer show about representing large numbers​
    15·1 answer
  • 15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!