JAVA

Write a method that takes an ArrayList of Strings, and an int numRepeats and returns a new ArrayList with the original ArrayList repeated numRepeats times.


For example if we had an ArrayList list with the values ["a", "b", "c"]:


repeatArrayList(list, 3)

Should return a new ArrayList with the elements:


["a", "b", "c", "a", "b", "c", "a", "b", "c"]


public ArrayList repeatArrayList(ArrayList list, int numRepeats)

{

}

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java. It creates a function that takes in an ArrayList and an int parameter. Then it loops through the array and adds each element into a new array called newList but adds them the number of times that the numRepeats argument states. Output can be seen in the attached image below.

import java.util.ArrayList;

class Brainly{

   public static void main(String[] args) {

       ArrayList list = new ArrayList();

       list.add('a');

       list.add('b');

       list.add('c');

       ArrayList newList = repeatArrayList(list, 3);

       System.out.println(newList);

   }

   public static ArrayList repeatArrayList(ArrayList list, int numRepeats) {

       ArrayList newList = new ArrayList();

       for (int x = 0; x < numRepeats; x++) {

           for (int i = 0; i < list.size(); i++) {

               newList.add(list.get(i));

           }

       }

       return newList;

   }

}

JAVAWrite A Method That Takes An ArrayList Of Strings, And An Int NumRepeats And Returns A New ArrayList

Related Questions

Kevin created a scene in an animation where he shows a leaf falling slowly. Which principle of animation did he follow in doing so? Kevin is using the principle of ____. This principle is proportional to the _____ of the objects displayed. Answers given for the first: Arcs, Timing, Staging Answers given for the second: Height, Length, Speed

Answers

Answer:

Kevin is using the principle of Timing. This principle is proportional to the Speed of the objects displayed.

Explanation:

Timing is one of the principles of animation wherein the speed of the movement of an object is controlled by the animator and made to harmonize with certain effects such as sounds. In an example of some projected balls we find that when getting to the peak, their movement is slower compared to when they are coming down.

Speed plays a key role here. This is similar to the slowly falling leaf. Speed and timing are major considerations. When paired with good sounds, the animation comes off better.

hi please help ASAP it's about html!​

Answers

Given :-

Create a HTML code for writing a web page for your school time-table.

Answer :-

<html>

<head>

<title> Time Table </title>

</head>

<hrcolor = "red">

<hrcolor = "blue">

<body>

<table><tr = "7"><md = "7"><Period 1_></table>

</body>

</html>

[tex] \\ [/tex]

Answered by - ItzMaster

Who is Carl Thompson?

Answers

Carl Thompson was a well know Jazz player back in the mid 1900s

What is the difference between a patent and a copyright?
A copyright protects inventions, a patent protects intellectual property.

B copyright protects intellectual property; a patent protects inventions.

C Copyrights are for music, and patents are for books.

D Patents are for books, and copyrights are for music.

Answers

Answer:b

Explanation:

The difference between a patent and a copyright is,

B) Copyright protects intellectual property; a patent protects inventions.

Given that,

To find the difference between a patent and a copyright.

We know that,

Copyrights primarily safeguard original works of authorship, such as literary, artistic, musical, or dramatic creations.

On the other hand, patents are granted to inventors to protect new and useful processes, machines, compositions of matter, or any new and inventive improvement thereof.

So, copyrights are more about creative expressions, like music and books, while patents are focused on protecting unique and innovative inventions.

Option B is true.

To learn more about copyright visit:

https://brainly.com/question/357686

#SPJ4

1) The Output of a computer can be seen on
b) Mouse
a) Monitor
c) Keyboard​

Answers

Answer:

Explanation:

Option B monitor is the correct answer

Answer:

ans is a

hello

myself swapna

Can you use 2 wireless keyboards and 2 wireless mouse on a dual monitor desktop without interfering with the other monitor ?

Answers

Answer:

I'm pretty sure this is not possible on Windows OS.

Explanation:

Two different monitors can work, as you probably know, but I don't think you can use separate keyboards and mice on the same machine.

Compare the OSI Application Layer with the TCP/IP Application Layer. Which statement is true? Both application layers are relevant mainly to programmers, not to network technicians. The OSI application layer involves more things than does the TCP/IP application layer. They are the same layer, only they are viewed through different conventions. The TCP/IP application layer is for the user; it is not important to programmers or network technicians.

Answers

Answer:

They are the same layer, only they are viewed through different conventions.

Explanation:

OSI model stands for Open Systems Interconnection. The seven layers of OSI model architecture starts from the Hardware Layers (Layers in Hardware Systems) to Software Layers (Layers in Software Systems) and includes the following;

1. Physical Layer

2. Data link Layer

3. Network Layer

4. Transport Layer

5. Session Layer

6. Presentation Layer

7. Application Layer

Each layer has its unique functionality which is responsible for the proper functioning of the communication services.

On the other hand, the Transmission Control Protocol and Internet Protocol (TCP/IP) Application Layer comprises of four (4) main layers and these includes;

I. Application layer.

II. Transport layer.

III. Internet layer.

IV. Network layer.

This ultimately implies that, the Open Systems Interconnection (OSI) Application Layer and the Transmission Control Protocol and Internet Protocol (TCP/IP) Application Layer are the same layer, only they are made up of different number of layers and as such are viewed through different conventions.

Answer:

c

Explanation:

One of the benefits of holding an investment for over a year rather than selling it in less than a year is that the
A: capital gains on the investment will be taxed at a lower rate.
B: fees will not be charged by brokers for selling the investment.
C: money earned on the investment will be considered tax-free.
D: profits on the investment can be averaged over the length of time the investment
is held.

Answers

Answer:

A, Capital gains on the investment will be taxed at a lower rate.

Explanation:

omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!omae wa mou shindeiru!!!!!!

z 1
-- = --
7 21
solve​

Answers

Answer:

[tex]z= \frac{1}{3}[/tex]

Explanation:

Given

[tex]\frac{z}{7} = \frac{1}{21}[/tex]

Required

Solve

[tex]\frac{z}{7} = \frac{1}{21}[/tex]

Multiply both sides by 7

[tex]7 * \frac{z}{7} = \frac{1}{21} * 7[/tex]

[tex]z= \frac{1}{21} * 7[/tex]

Rewrite as:

[tex]z= \frac{1 * 7}{21}[/tex]

[tex]z= \frac{7}{21}[/tex]

Simplify fraction

[tex]z= \frac{1}{3}[/tex]

A DTP firm has published and printed fliers for an upcoming fundraising event. In which section of the flyer would you find the contact details of the DTP firm
A. Body
B. Credits
C. Navigation
D. Title

Answers

B.Credits at the end of the flyer

PLEASE HELP !!!!!!!!!!!!!
What is revising?

Answers

Answer:

Revision literally means to “see again,” to look at something from a fresh, critical perspective. It is an ongoing process of rethinking the paper: reconsidering your arguments, reviewing your evidence, refining your purpose, reorganizing your presentation, reviving stale prose.

In python please!! Write the definition of a function named countPos that needs integer values from standard input until there are none left and returns the number that are positive. The function must not use a loop of any kind.

Answers

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

You are part of a testing team at a software business. Your job is to see how many concurrent users the system can host and how many database transactions the system can handle without a noticeable drop in performance. You are doing _____ testing. a. acceptance testing b. volume testing c. system testing d. integration testing

Answers

Answer:

The right approach is Option b (volume testing).

Explanation:

A non-functional trial that has been conducted throughout a results evaluation where even a large amount of information becomes accessible to something like the program, would be determined as Volume testing.The application functionality has been analyzed by determining the maximum volume throughout the database.

Other options are not related to the given query. So the above is the right response.

What is the dark, sticky substance that forms when tobacco is burned?

Answers

Answer: Tar.

Explanation:

A chemical substance made when tobacco is burned. Tar contains most of the cancer-causing and other harmful chemicals found in tobacco smoke. When tobacco smoke is inhaled, the tar can form a sticky layer on the inside of the lungs.

A man-in-the-middle attack or impersonation are likely to result in problems with

data availability.

data confidentiality.

data integrity.

data mining.

Answers

Answer:

Data Confidentiality

Explanation:

A Man-In-The-Middle-Attack (MITM) is an attack when a hacker gets between a communicative situation and digitally eavesdrops.

A man-in-the-middle attack or impersonation is likely to result in problems with data confidentiality. Thus, option B is correct.

What is a  man-in-the-middle attack?

A man-in-the-middle (MITM) attack is a broad name used whenever an abuser inserts himself into a conversation between a user and now an application. That will listen in on the conversation or to pretend to be one of the participants and create the impression that normal information-sharing is taking place.

Attacks compromise the integrity and confidentiality of exchanges, which exposes information, technology, and other things to malevolent use. Consider the threat if a hacker was able to remotely open an automatic door lock or deploy the airbags in a linked car.

Therefore, option B is the correct option.

Learn more about man-in-the-middle attack, here:

https://brainly.com/question/13014110

#SPJ6

PLEASE PLEASE HELP pleeeeeeeeeaaaase

Answers

Answer:

Truuuuuuueee

Explanation:

Plz give brainliest

Answer:

It's true

Explanation:

I just had the same question , ur welcome :)

What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
The most common thing to share in Outlook is the calendar.
The Publish Online option is for users outside an organization.
Changing calendar permissions only changes what a user can see.
Publishing a calendar online will allow anyone in the world to see it.
The Share option opens an email message that sends the calendar link.
O Calendar sharing options include Email, Share, Publish Online, and Delegate.

Answers

Answer:

The characteristics of calendar sharing options in Outlook 2016 are;

1) The most common thing to share in Outlook is the calendar

2)  The Publish Online option is for users outside an organization

4) Publishing a calendar online will allow anyone in the world to see it

5) The Share option opens an email message that sends the calendar link

6) Calendar sharing options include Email, Share, Publish Online, Delegate

Explanation:

1) Sharing is used mostly by a group of people working on a given project

Items commonly shared in Microsoft Outlook includes email Folders calendars and address books (contacts)

Therefore, for people working on a project together, the most common thing to share in Microsoft Outlook 2016 is the calendar

2) The Publish Online option allows a user to make a calendar available to people outside the organization

3) The calendar sharing permissions are;

a) Who can view the date and time marked as busy

b) Who can view the location and titles of appointments

c) Who can view all the calendar details

d) Who can edit

e) Who can delegate

Therefore, changes in calendar permissions does not only change what the user can see

4) When publishing a calendar, a special URL is created that can be shared to people outside of an organization

A published calendar can be viewed by everyone that has the calendar link

Therefore, publishing a calendar online will allow anyone in the world to see it

5) When a calendar is shared, the person with which the calendar is shared will receive an invitation email for the invitee to accept with an "Open this Calendar" button

Therefore, the Share option opens an email message that sends the calendar link

6) Calendar sharing options includes

a) Sharing the calendar within the organization

b) Publishing a calendar to the web to share the calendar

c) A calendar can be shared in an email

d) Authority can be delegated to a particular calendar

Therefore, calendar sharing options include Email, Share, Publish Online, Delegate

1, 2, 3, 5

just did it

Arranging a given set of data in ascending or descending order is ...................​

Answers

Explanation:

maybe it's answer is sorting

How is a high-level programming language compiled? (5 points)
O a
A binary interpreter is used to translate each line of code.

All lines of code are translated together and then executed at once.
ос
One line of code is translated and then executed before moving to the next line.
d
Six lines of code are translated and then executed before moving to the next set of six.

Answers

Answer:

A high-level language is a programming language that uses English and mathematical symbols in its instructions. To execute a program in a high-level language, it can be compiled or interpreted. A compiler translates the entire program written in a high-level language to machine language prior to execution. After the compiler translates the code into machine language, it is typically executed line-by-line.

Explanation:

Answer:

One line of code is translated and then executed before moving to the next line.

ANSWER ALL QUESTIONS CORRECTLY PLEASE AND YOU WILL GET A BRAINLIEST AND 10+ POINTS!!!! I WOULD REALLY APPRECIATE IT

Through the use of ICT and emerging technology in todays world, a number of sectors have been affected (whether in a positive or negative way). Three sectors in which ICT has had an impact are the health care, education, and banking sector.
Define the term ICT?

List three ICT tools that are commonly used in the education system?


Identify two ways in which ICT has impacted the education sector?

Answers

Answer: uhm can u explain what ICT is so i can understand the questions pls when i whould gladly help :)

Explanation:

Write a JavaScript program to create a multiplication table for numbers 1 to 12 using a while loop. I’ll mark brainliest, thanks

Answers

Answer:

</p><p>

</p><p>days1(); // calling function days1()

</p><p>

</p><p>function  days1() // function days1

</p><p>

</p><p>{

</p><p>

</p><p>var  week = ["sunday ", "monday ", "tuesday "," wednesday"," thursday",

</p><p>

</p><p>"friday"," saturday"];

</p><p>

</p><p>var i;

</p><p>

</p><p>for (i=0;i<7;i++)  // iterating over the loop

</p><p>

</p><p>{  

</p><p>

</p><p>document.write(" The number of days in a week :" +</br>);

</p><p>

</p><p>document.write( week[i] + "</br>" );  // print the number of days

</p><p>

</p><p>}

</p><p>

</p><p>}

</p><p>

</p><p>

Output:

The number of days in a week :

sunday

monday

tuesday

wednesday

thursday

friday

saturday

Explanation:

In this program, we create a function days1().In this function, we declared an array i.e "  week " which will store the list of the days of the week. After that, we iterate the for loop and prints a list of the days of the week.

what method of technical drawing uses converging lines?

Answers

The foundation of linear perspective is the concept of diminution, which states that objects appear to get smaller as they travel farther away from the observer.

What's a good illustration of linear perspective?

The seeming convergence of two parallel lines, particularly when looking at a lengthy section of two-lane highway, is an illustration of linear perspective. People who watch the highway in front of them have the impression that the lanes are converging at the horizon.

One kind of linear perspective is one point perspective. In a flat work of art, linear perspective creates the appearance of space and form by using lines to depict objects. It is a methodical method of drawing. One point perspective, which only uses one vanishing point, earns its name.

There are three forms of linear perspective. One point, two point and three point. When the vanishing point for the objects in your picture is close to the center of the scene, you have one point perspective, which is the simplest sort of perspective.

To learn more about linear perspective  refer to

https://brainly.com/question/22902116

#SPJ1

What is Polymorphism in programming? Explain in your own words with examples.

Answers

Answer:

A computer program which can change on it's own, such as a polymorphic virus that is harder to detect. It can change it's own code to achieve the same goal but have a different structure.

Explanation:

Answer:

Polymorphism is a feature of object-oriented

programming languages that allows a specific routine to use variables of different types at different times. Polymorphism is the ability of a programming language to present the same interface for several different underlying data types.

Explanation:

hope it helps

A way to categorize information and point you to where to find that information is called
a. An index c. A table of contents
b. A glossary d. Both A and C

Please select the best answer from the choices provided
A
B
C
D

Answers

I think the answer is D

Answer:

D

Explanation:

how important the role of valet and butler service in the hospitality

Answers

very important bc they help you with what you need.

About C header files of C programming

Answers

Answer:

A header file is a file with an extension. Which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that come with your compiler.

Write a pseudocode algorithm that ask a user to enter three numbers. The program should calculate and print their average

Answers

Answer:

BEGIN

INPUT first_number, second_number, third_number

average = (first_number + second_number + third number)/ 3

PRINT average

END

Explanation:

That is the simplest answer one can create

Datawriter
Create a File object using "data.txt" as the argument to its constructor. Store the reference to the new File object in a variable of type File.
Will mark brainliest

Answers

Answer:

Explanation:

The owner of a hotel has contracted with you to implement a wireless network to provide internet access for guests. The owner has asked that you implement security controls so that only paying guests are allowed to use the wireless network. She wants guests to be presented with a login page when they initially connect to the wireless network. After entering a code provided by the concierge at check-in, guests should then be allowed full access to the internet. If a user does not provide the correct code, he or she should not be allowed to access the internet. What should you do

Answers

Answer:

Have them try again. If it still is wrong then maybe dont let them use the internet!

We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the challenges you would face in such a scenario.

Answers

Answer:

Explanation:

Everything runs on the internet nowadays. Living without internet would bring many challenges. One of which would be difficulty making purchases. It is not always easy to find what you need close by which is why the majority of commerce nowadays is done through the internet. Another difficulty would be the lack of information, not being able to quickly search for something. Lastly, and probably the most important is the lack of communication. Without internet, you would lose contact with many loved ones around the world and would be limited to telephone communication.

Other Questions
Which solid figures have two bases? (Check all that apply.)cylindersconesprismspyramidsI think it's Cylinders and Prisms. What might happen if the number of chromosomes within the cells did not change but new daughter cells were still made? (meiosis) The following sentence contains a comma splice: Do you have any bandages, I tripped over a stick and skinned my knee.Which revision corrects the sentence? a. Do you have any bandages? I tripped over a stick and skinned my knee? b. Do you have any bandages?; I tripped over a stick and skinned my knee. c. Do you have any bandages? I tripped over a stick and skinned my knee. d. Do you have any bandages, I tripped over a stick, I skinned my knee Which of the following organisms are most closely related evolutionarily? A. starfish and sand dollar B. fish and starfish C. fish and clam D. crab and starfish The jeweler has a stock of alloys that are 25% gold, 50% gold, and 82% gold. Choose 2 different alloys that can be used to create an alloy that is 75% gold. Explain why you chose these alloys. Can someone Please help me ? [tex] \frac{x}{ \sqrt[5]{y} {}^{} {7} } [/tex] yeah please help me The farmer walks by the pen with the chickens and pigs. He counts 18 heads and 50 feet. How many of each, chicken and pigs, are there? PART A: Which statement identifies the central idea of the textA The boiler malfunction and the deaths that occurredbecause of it were unavoidable,e While the explosion caused numerous deaths, thewidespread panic of workers caused even more,C The boiler malfunction caused widespread death anddestruction at the shoe factory, as well as neighboringbuildings,OD The explosion at the shoe factory caused severe structuraldamage and required hard work and a lot of money to repair, A right triangle has a hypotenuse of 15 cm. What are possible lengths for the two legs of thetriangle? Explain your reasoning. Which table of values goes with the equation y = 3x ^2 + 1? Practice QuestionNight Bird looked quickly behind her andgaspedAn old woman stood silently by her elbow. Herfeet were as bare as Night Bird's. Her neckwas hidden under string after string of bluebeads."Grandmother! What are you doing here?" Find the values of x and y. 13.Three boxes of cereal are shared equally among8 boys. What fraction of a box does each boy get? What do all animals, including vertebrates and invertebrates, have in common?Question 1 options:They have backbones, internal skeletons, and muscles.They are heterotrophs that must get their food from plants or other animals.They have lungs or gills for breathing.They are endothermic (warm-blooded).Question 2 (1 point) SavedAll animals share several common characteristics. Which is a characteristic shared by all animals?Question 2 options:endoskeletons and musclessensory organs and backbonesmulti-cellular bodiesexothermic blood systemsQuestion 3 (1 point) Sams teacher asked him to make observations about animals at the zoo. Sam went to the zoo and filled in these two charts that the teacher gave him.What is the main difference between the species in Group 1 and Group 2?Question 3 options:Group 1 has small organisms, Group 2 has large organisms.Group 1 are endothermic, Group 2 are exothermic. Group 1 are vertebrates, Group 2 are invertebrates.Group 1 has exoskeletons, Group 2 has soft bodies.Question 4 (1 point) Which of the following is a characteristic of all mammals?Question 4 options:lungshairtailboth 1 and 2Question 5 (1 point) What is the benefit of an arthropods exoskeleton.Question 5 options:It allows arthropods to breathe.It protects and supports the arthropods body.It allows the arthropod to get food.It allows the arthropod to see far distances.Question 6 (1 point) What do arthropods and segmented worms have in common?Question 6 options: They both have segmented bodies during some stage of their life.They both have hard outer shells that are unmovable. They both have bones and vertebrae.They both lack any sense organs.Question 7 (1 point) To which group of invertebrates do cephalopods, such as squids, belong?Question 7 options:ArthropodsEchinodermsCnidariansMollusksQuestion 8 (1 point) Sweat glands, fur, and feathers are found on an endotherm.Question 8 options:TrueFalseQuestion 9 (1 point) Vertebrates and invertebrates differ in the presence of a backbone. Another characteristic that distinguishes most vertebrates from many invertebrates, is that vertebrates Question 9 options:have a relatively well-developed brain and circulatory system.have long tube-like bodies that are divided into segments.take in oxygen from their skins rather than from an inside organ.have hard outer covering called exoskeletons.Question 10 (1 point) During chilly days, you might notice lizards lying (basking) in sunny areas. Why do lizards bask in the sun?Question 10 options:Ectothemic animals are lazy and the sun puts them to sleep.Ectothermic animals need to get tanned by the sun's rays for camouflage.Ectothermic animals use the suns rays to help them hide from enemies.Ectothermic animals need the warmth from the sun to allow them to move around and hunt for food.Question 11 (1 point) Which group of animals could be correctly classified as endothermic?Question 11 options:robin, squirrels, micebears, snakes, wolvesfrogs, lizards, snakesgroundhogs, hawks, crabQuestion 12 (1 point) Using the table, which statement is true?Question 12 options:Organisms in both Groups A and B have similar mechanisms for controlling their internal temperatures.Organisms in Group A have fewer mechanisms for controlling their internal temperatures than those in Group B. Organisms in both Group A and B usually coexist peacefully.Organisms in both Group A and B are extinct species.Question 13 (1 point) How do warm-blooded animals cool off?Question 13 options:They convert the food they eat into cool energy.They sweat or pant to lose heat by water evaporation.They move to colder climates.They move around a lot to stimulate their circulation.Question 14 (1 point) An animal takes on the temperature of their surroundings so they don't have to use food energy to keep warm. This means they dont have to eat as often. They are considered an __?Question 14 options:EndothermEctothermQuestion 15 (1 point) Which of these factors is used to classify the different organisms on Earth into Kingdoms (such as protists, fungi, plant, animals, and bacteria) ?I Number of cells in the organismII How the organism obtains energyQuestion 15 options:I onlyII onlyI and IIQuestion 16 (1 point) It's sunny in New York, but it is cool. Where would you expect to find this lizard during the day?Question 16 options:Under a rockIn a damp stream bedBasking in a sunny spotIn a hole in the ground The ratio of Warrior fans to Laker fans at a basketball game was 5 to 3. Ifthere were 21 Laker fans, how many Warrior fans are there 7 points i think** please help! :3 NEED HELP ASAP Determine the roots of the equation by factoring. Write your answer in set notation. What are 2 community resources for teens?