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
________ is a password-cracking method wherein the attacker compares passwords to lists of common words.
Dmitriy789 [7]
Hi!

When someone repeatedly compares passwords to lists of common words, this is known as the dictionary attack.

We call it this because they are <em>literally </em>using a dictionary to attack you!

Hopefully, this helps! =)
7 0
3 years ago
Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
Tcecarenko [31]

Answer:

30cm

Explanation:

Height X Base

6cm X 10cm

60cm

Then take half because a triangle is half a square and we are using a square formula.

60cm divided by 2

=30cm

7 0
2 years ago
What is the recommended solution to configure this automated behavior? UC has a requirement that an opportunity should have a fi
Dmitry_Shevchenko [17]
The answer will need to be workflow.
8 0
3 years ago
PLEASE HELP ASAP (answer is needed in Java) 70 POINTS
8_murik_8 [283]

import java.util.Scanner;

public class MyClass1 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int smallest = 0, largest = 0, num, count = 0;

     while (true){

         System.out.println("Enter a number (-1 to quit): ");

         num = scan.nextInt();

         if (num == -1){

             System.exit(0);

         }

         else if (num < 0){

             System.out.println("Please enter a positive number!");

         }

         else{

             if (num > largest){

                 largest = num;

                 

             }

             if (num < smallest || count == 0){

                 smallest = num;

                 count++;

             }

             System.out.println("Smallest # so far: "+smallest);

             System.out.println("Largest # so far: "+largest);

         }

     }

   }

}

I hope this helps! If you have any other questions, I'll do my best to answer them.

6 0
2 years ago
Jim has just purchased two new SCSI hard disk drives and a controller card for them. He properly installs the hardware in his ma
yawa3891 [41]

Answer:

  • Create partitions on each hard disk drives.
  • Mount the partition created on each hard drive so they are accessible by the the operating system.
  • Format the partitions created with a filesystem recognized by Linux.

Explanation:

Having purchased the two new SCSI hard disk drives with the controller cards for each and installed them properly, before using them for data storage and retrieval he must first use the fdisk command to create one or more partitions on each of the hard disk drives then mount any partitions created on the two hard drives so that they are accessible by the operating system before then proceeding to format any partitions created with a valid filesystem recognized by Linux.

4 0
3 years ago
Other questions:
  • Consider the following scenario: "You are an assistant to the accounting manager for a small company that sells sports equipment
    5·1 answer
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • Henry uploaded the photos of his birthday to a cloud storage system. He feels that it’s a safe option for data storage. His frie
    12·1 answer
  • What kind of fragment is near the computer?
    14·1 answer
  • In a power point a type of chart that rather than showing numerical data illustrates a relationship or logical flow between diff
    12·1 answer
  • Which of the following statements represents the number of columns in a regular two-dimensional array named values?
    9·1 answer
  • EXCEL 2016:
    8·2 answers
  • Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in t
    15·1 answer
  • Scott is an aspiring software developer. During an interview for a new job, his prospective employer asks what kind of program h
    12·1 answer
  • Compare and contrast hardware and software.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!