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
REY [17]
3 years ago
15

Write a public static method named printArray, that takes two arguments. The first argument is an Array of int and the second ar

gument is a String. The method should print out a list of the values in the array, each separated by the value of the second argument.
Computers and Technology
1 answer:
Serjik [45]3 years ago
5 0

Answer:

Written in Java

public static void printArray(int myarr[], String s){

       for(int i = 0; i<myarr.length;i++){

           System.out.print(myarr[i]+s);

       }

   }

Explanation:

This defines the static method alongside the array and the string variable

public static void printArray(int myarr[], String s){

The following iteration iterates through the elements of the array

       for(int i = 0; i<myarr.length;i++){

This line prints each element of the array followed by the string literal

           System.out.print(myarr[i]+s);

       }

   }

The method can be called from main using:

<em>printArray(myarr,s);</em>

Where myarr and s are local variables of the main

You might be interested in
1. _______ is when two things happen at one time when using the Scratch program.
Alja [10]
1. Parallel Execution
3. Hope that a company calls you and offers you a position
4. Intranet
5. Percent
8 0
3 years ago
10(            )  8(532.2 )                         
blagie [28]

Answer:

346.30

Explanation:

7 0
3 years ago
There are 4 classrooms for fifth grade and 4 classrooms for sixth grade at a school. Each classroom has 20 students. A teacher i
olga_2 [115]

Answer:

what do you want

Explanation:

there are 160 people in all if thatś what you want

5 0
3 years ago
Read 2 more answers
You received an email from someone who claims to be a representative from your school. The email asked you to click on a link to
Sergeeva-Olga [200]

Answer:

Phishing

Explanation:

Phishing = Link to a site, usually a fake replica of a legitimate site but with added implements that can be used to spy on you (how people become victims of identity theft

6 0
3 years ago
How frequently should computers containing ehr information be backed up?
geniusboy [140]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
7 0
3 years ago
Other questions:
  • Special programs that facilitate communication between a device and the os are called
    12·1 answer
  • Which of the following best defines Monte Carlo simulation?a. It is a tool for building statistical models that characterize rel
    11·1 answer
  • You are the leader of a team at work. What type of leader would you like to be – one that gets involved and works with the team
    15·2 answers
  • What is the primary purpose of source code editor features such as keyword hi lighting and auto-completion A.to speed up the cod
    7·1 answer
  • When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make su
    14·2 answers
  • Plz help Complete the sentence.
    11·2 answers
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
  • Which of the following online creation tools will be used if a person wants to create a video presentation?
    8·1 answer
  • Define technical writing. The proposal introduces the ……. (5 Mark)
    9·1 answer
  • Consider a game that is searched using random restart hill climbing strategy. Assume that the success rate for the game is 25%.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!