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
Nadya [2.5K]
3 years ago
6

Suppose you wish to write a method that returns the sum of the elements in partially filled array. Which is the best choice for

a method header? Group of answer choices public int sum() public int sum(int[] values, int currSize) public int sum(int[] values) public int sum(int[] values, int size, int currSize)
Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
5 0

Answer:

The Method header to this question is "int sum(int[] values, int currSize)".

Explanation:

According to the question, It is defined that choose the correct option which creates a method header sum and returns the sum of the array element. In given options, we choose option second because in this option method return type is int and use an integer variable that is "currSize" which calculate the sum and return its value and other option are not correct that can be described as:

  • In the first option, we create a method but we do not pass any parameter so it will not calculate the sum of array elements.
  • In the third option, we create a method but we pass only one parameter that is an array. So, it will not calculate the sum of array elements correctly.
  • In the fourth option, In this method, we pass three parameters that are "values, size and currSize" in which the size parameter not use.

That's why the answer to this question is option second which is "int sum(int[] values, int currSize)".

You might be interested in
Why are modern manufacturing techniques preferred over those historically used by artisans?
zaharov [31]
Manufacturing through machinery allows for below advantages, 

1. Reproducibility - Achieving close to same results is higher.
2. Productivity - Saves time, produce more in quantity and could cost less as materials is saved more.
3. Consistency - Consistent as the method is replicated to a better percentage than manual method.
4. Precision - Use of machines in manufacturing allows for precise measurement of parts.

5 0
3 years ago
Kelly completes a bachelor's degree in animation from a top school in New York. She would now like to look for a job that will p
nikdorinn [45]
I believe she would have a best chance in a media production house, animation is a form of media and would be best put to use there.
8 0
3 years ago
Read 2 more answers
In the ( ) Model, each in a network can act as a server for all the other computers sharing files and acsess to devices
Pavel [41]

Answer:

C peer to peer

Explanation:

  • A peer to peer is a computer network in a distributed architecture that performs various tasks and workload amount themselves. Peers are both suppliers and consumers of resources. Peers do similar things while sharing resources, which enables them to engages in greater tasks.
3 0
3 years ago
Which of the following application delivery methods requires Internet access?
morpeh [17]

Answer:Cloud hosted

Explanation:

3 0
3 years ago
Coding question. Please help me?
Marizza181 [45]

Answer:

a  for a loop

Explanation:

7 0
3 years ago
Other questions:
  • a _____ is a recreation of a thumbnail in a desktop publishing software, also known as a "rough". a. proof b. digital draft c. l
    15·1 answer
  • Once in debt, ________ is your companion every minute of the day and night, you cannot shun it or slip away from it . . . and wh
    10·1 answer
  • What is the purpose of a diode in a cordless drill or power screwdriver?
    14·1 answer
  • The blank is the area on your screen where you can access the tab and menu options for word
    5·1 answer
  • What is HTML ? <br>Give a small description about html
    12·2 answers
  • There are three main components to economic growth. Which of the following is NOT a component of economic growth?
    7·1 answer
  • Which of the following is a common sense safety procedure that can help prevent electrical accidents?
    15·1 answer
  • What is the purpose of a mutator?
    8·1 answer
  • Write a program that sorts an array of 20 random numbersin the range from 0 through 1000.
    6·1 answer
  • Gourmet pizza shop with a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!