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
When solving a problem in a group situation, which of the following traits should be demonstrated?
kakasveta [241]

Answer:

compromise should be demonstrated

8 0
3 years ago
Types of data processing
Semmy [17]

Answer:

5 types

Explanation:

translation

distributed

batch

multi

real time

sorry if I'm wrong

4 0
3 years ago
a user reports that her computer monitor will not allow her to switch back and forth between Microsoft word and internet explore
san4es73 [151]

Answer: B. Interrupts

Explanation:

Interrupts is a feature of digital computers that enables the interruption of the process the computer is currently engaged in so that the computer can process the new command. Interrupts is the reason I am able to type this answer because interrupts is interrupting my browser to process my typing.

If a user reports that their computer monitor will not allow her or him to switch back and forth between Microsoft Word and Internet Explorer, it is possible that the interrupts function is not working effectively to enable the switch. by interrupting one of the programs.

7 0
3 years ago
What device is designed specifically to reduce broadcast traffic that passes over a network and to choose the best path for movi
mezya [45]

Answer:

Router        

Explanation:

  • A router is a network device that forwards data packets between networks. Its a network layer hardware device. For example a DSL router that connects to the Internet through an internet service provider.
  • Router is connects at least 2 networks (can be two LANs) and the ISP.
  • Router is used to transfer data from one network to another if both networks use same protocols.
  • It receives data in packets form and forwards the data to another router using a routing table. These data packets can be sent between devices or from devices to the internet.
  • The routing table is used to choose the optimal path for forwarding the packets between the source and destination hosts. Routing table configure the best route a packet can take to reach its destination using routing protocols. A Routing Protocol defines how routers connect with each other and share information that makes them choose routes on a computer network between source and destination. Routing tables can be configured statically (routes are fed manually) or dynamically (routes are updated based on information obtained  from other routers).
  • Router makes sure that the data packets reach right destination instead of being lost within the network and it also strengthen signals before transmitting them.
  • Routers reduce broadcast traffic. They form boundaries between broadcast domains and separate a network into multiple broadcast domains.
  • Router do not broadcast traffic and eliminates the packet when it detects a broadcast address. Routers also stop broadcast messages and don't route a broadcast message between broadcast domains.
6 0
3 years ago
HEEELLPPPPP, ILL GIVE THE BRAIN THING
sladkih [1.3K]
Can you explain more please??!
5 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell the word correctly.
    14·2 answers
  • The command prompt found on windows 10 is very similar to the interface of what past operating system?
    5·2 answers
  • What is the Web of Trust?
    12·1 answer
  • Caitlyn's Crafty Creations computes a retail price for each product as the cost of materials plus $14 multiplied by the number o
    10·1 answer
  • Write two methods: encrypt and decrypt. encrypt should #take as input a string, and return an encrypted version #of it according
    6·1 answer
  • Define the function max2 that takes two integers as arguments and returns the largest of them. Then define the function max_list t
    11·1 answer
  • If you have an equipment failure while driving on an expressway, you should
    8·1 answer
  • Complete the statement by entering the appropriate term in the space below.
    13·2 answers
  • What is a key differentiator of Conversational Artificial Intelligence (AI)
    11·1 answer
  • Which file types have exe and png as their extensions?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!