subject

Write a method manyStrings that takes an ArrayList of Strings and an integer n as parameters and that replaces every String in the original list with n of that String. For example, suppose that an ArrayList called "list" contains the following values:("squid", "octopus")And you make the following call:manyStrings(list, 2);Then list should store the following values after the call:("squid", "squid", "octopus", "octopus")As another example, suppose that list contains the following:("a", "a", "b", "c")and you make the following call:manyStrings(list, 3);Then list should store the following values after the call:("a", "a", "a", "a", "a", "a", "b", "b", "b", "c", "c", "c")You may assume that the ArrayList you are passed contains only Strings and that the integer n is greater than 0.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 05:50
What all vehicles has tesla inc. created over the years
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
You know the right answer?
Write a method manyStrings that takes an ArrayList of Strings and an integer n as parameters and tha...
Questions
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
question
Mathematics, 06.02.2021 01:50
Questions on the website: 13722361