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
solmaris [256]
4 years ago
12

Create a static method called fillArray, which takes an integer array as an input parameter, along with an integer initial value

. It should then fill the array with values starting from the initial value, and counting up by 1s. For example, if the data array has length 5, and if the initialValue is 3, then after execution the array should hold this sequence: 3 4 5 6 7. public static void fillArray (int[] data, int initialValue) {
Computers and Technology
1 answer:
JulijaS [17]4 years ago
3 0

Answer:

public class print{

   

   public static void fillArray(int[] arr, int initialValue){

       

       int n = arr.length;

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

          arr[i] = initialValue++;

      }

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

           System.out.print(arr[i]+" ");

      }

       

   }

    public static void main(String []args){

       

        int[] array = new int[5];

        int initialValue =3;

       

        fillArray(array,initialValue);

       

    }

}

Explanation:

Create the function with two parameter first is array and second is integer.

Then, declare the variable and store the size of array.

Take the for and fill the array from the incremented value of initialValue  by 1 at every run of loop.

After loop, print the element of the array.

Create the main function which is used for calling the function and also declare the array with size 5 and initialValue with 3. After that, call the function with this argument.

You might be interested in
Using hard disk space to temporarily store data or instructions from ram is referred to as the
madreJ [45]
*nix - swap partition
All OS's - swap file[s]
Windows - page file
5 0
4 years ago
You have recently been hired as the new network administrator for a startup company. The company's network was implemented prior
AleksAgata [21]

Answer: • Physically secure high-value systems

• Identify and document each user on the network

Explanation:

To develop a manageable network plan, the milestones include:

• prepare to document

• mapping network,

• protect your network

• network accessibility

• user access etc...

When identifying ways to protect the network, the tasks that should be completed are:

•®Physically secure high-value systems

• Identify and document each user on the network

4 0
3 years ago
Suppose that a 2M x 16 main memory is built using 256kB x 8 RAM chips and memory is word addressable, how many RAM chips are nec
hoa [83]

Answer:

16 RAM chips

Explanation:

To calculate the number of RAM chips needed, we divide the total size of the main memory by the size of each RAM chip. Hence:

Number of RAM chips required = Main memory size / size of one RAM

2M = 2²¹, 16 = 2⁴, 256K = 2¹⁸, 8 = 2³

Hence:

Number of RAM chips required = (2²¹ * 2⁴) / (2¹⁸ * 2³) = 2⁴ = 16

Therefore 16 RAM chips are necessary

5 0
3 years ago
Help ASAP!!! During which phase of a well-structured study session is each occurring?
gladu [14]

Answer:

1. drill

2. discuss

3. review

4. prepare

Explanation:

Your Welcome!

7 0
3 years ago
Read 2 more answers
What tool can you use to stop and restart the windows print spooler?
o-na [289]
Service Console hope this helps.
4 0
4 years ago
Other questions:
  • Why should you open your door with your right hand when parked on a right-side curb?
    15·1 answer
  • Write a statement that declares a prototype for a function add, which has two int parameters and returns an int .
    13·1 answer
  • Describe the concepts of Defense in Depth and Detection in Depth. Compare and contrast. What's different? What's similar?
    9·1 answer
  • R7.1 Carry out the following tasks with an array:
    7·1 answer
  • A customer contacts the help disk stating a laptop does not remain charged for more than 30 minutes and will not charge more tha
    9·1 answer
  • Write a method public static ArrayList merge(ArrayList a, ArrayList b) that merges two array lists, alternating elements from bo
    14·1 answer
  • What technology would you like to use or see developed that would help you be a "citizen of the world"?
    5·1 answer
  • How is a Creative Commons license different from a regular copyright?
    11·1 answer
  • A large electronic game manufacturer decides to establish a customer service center in Lahore, Pakistan. This is an example of _
    10·1 answer
  • The following is a function:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!