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?

A. public int sum(int[] values)
B. public int sum()
C. public int sum(int[] values, int currSize)
D. public int sum(int[] values, int size, int currSize)

Answer: C. public int sum(int[] values, int currSize)

Computer Science & Information Technology

You might also like to view...

When using the Between comparison operator, Access will add ________ around the date fields to search correctly

A) quotation marks (") B) asterisks (*) C) pound signs (#) D) ampersands (&)

Computer Science & Information Technology

A photo album is a presentation composed of pictures

Indicate whether the statement is true or false

Computer Science & Information Technology