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
galina1969 [7]
4 years ago
11

Write a method called printStrings that accepts a String and a number of repetitions as parameters and prints that String the gi

ven number of times. For example, the call: printStrings("abc", 5); will print the following output: abcabcabcabc
Computers and Technology
1 answer:
Brilliant_brown [7]4 years ago
6 0

Answer:

   public static void printString(String x, int y){

       //Create a for loop

       //How does a for loop work?

       //It collects a starting point, an end point and an increment respectively....all these are passed in as arguments into the for loop

       //For example, the code below starts from 0, lets say we set y=5, the loop runs from zero to 5... i.e  

       //Note: i++ in the loop is the increment, it means the loop increases by 1

       for(int i=0; i<y; i++){

           //As the loop increases, your String is printed

           //So... the number of strings printed is directly proportional to the number of times your loop runs

           System.out.print(x);

       }

       

   }

Explanation:

Create a for loop

How does a for loop work?

It collects a starting point, an end point and an increment respectively....all these are passed in as arguments into the for loop

For example, the code below starts from 0, lets say we set y=5, the loop runs from zero to 5... i.e  

Note: i++ in the loop is the increment, it means the loop increases by 1

As the loop increases, your String is printed

So... the number of strings printed is directly proportional to the number of times your loop runs

You might be interested in
Which amendment to the Constitution ended slavery in the United States?
KonstantinChe [14]
<span>The amendment to the constitution which ended slavery in the United States of America is the thirteen amendement. The correct option is B. The thirteen amendment forbades slavery and involuntary servitude in United States of America. The amendment was passed at the end of the civil war.</span>
4 0
4 years ago
In order to prevent unauthorized access, how can the shadow file be configured to enforce a password policy?​ What happens to ac
NemiM [27]

Answer : The securtiy of the password can be maitained by the shadow files such as:-

  • max is for the days that represent that the same password can be used without the need for changing it  
  • min is for the days that represent waiting days before the changing of password after he/she gets a new password
  • warn are the days that come with Waring sign that the password is going to expire soon.

For a certain period of time , the user can access the log in when the password has expired . If that period is timed out then there will be no log in option and the account gets disabled.

4 0
3 years ago
Most of the Desktop games contain a backdoor used to test and update the game.
sveta [45]

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device (e.g. a home router), or its embodiment (e.g. part of a cryptosystem, algorithm, chipset, or even a "homunculus computer" —a tiny computer-within-a-computer such as that found in Intel's AMT technology).Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptographic systems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

the answer is True

i hope it will help you

8 0
3 years ago
Electronically, or on paper draw a Binary Search Tree using the values below. Note: Insert each value into the tree in order fro
maria [59]

Answer:

A.)  in order traversal - 9 32 35 14 27 25 2 7 29

B.) pre-order traversal - 25 14 32 9 35 27 7 2 29

C.) post-order traversal - 9 35 32 27 14 2 29 25

Explanation:

Given - 25, 14, 7, 32, 27, 2, 29,9,35

To find - On a separate electronic page or sheet of paper:

1. List the values using in order traversal

2. List the values using pre-order traversal

3. List the values using post-order traversal

Proof -

Given values are -

25, 14, 7, 32, 27, 2, 29,9,35

1.)

In order is -

9 32 35 14 27 25 2 7 29

2.)

Pre-order is - (Root left right)

List nodes of first time visit

25 14 32 9 35 27 7 2 29

3.)

Post-order is - (Left Right Root)

List nodes of third time visit

9 35 32 27 14 2 29 25

5 0
3 years ago
Su now wants to modify the text box that contains her numbered list. She accesses the Format Shape pane. In what ways can Su mod
Fiesta28 [93]
I believe its E she can insert a picture in the text book
7 0
4 years ago
Read 2 more answers
Other questions:
  • Which would cause a decrease in the quantity of computers supplied?
    15·2 answers
  • Business Risks are ​
    15·1 answer
  • If you press the tab key when you're in in the last cell of a table,
    10·1 answer
  • Internally, computers are constructed from circuitry that consists of small on/off switches. What is the most basic circuitry-le
    12·1 answer
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    13·1 answer
  • This type of connection uses radio waves to connect devices on a network.
    15·2 answers
  • Which is considered to be the oldest form of social media? A. media-sharing sites B. location-based services C. social networkin
    5·1 answer
  • Check examples of a good work ethic. *
    6·1 answer
  • What does “human-like” mean when we are talking about a machine?
    7·1 answer
  • 2. The<br>is the main and usually largest data storage hardware device in a computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!