For most exceptions you must either catch them or have the method specify that they might be thrown. See, eg, The Catch or Specify Requirement in Oracle's Tutorial.
(Like the behaviour of the...
Type: Posts; User: pbrockway2
For most exceptions you must either catch them or have the method specify that they might be thrown. See, eg, The Catch or Specify Requirement in Oracle's Tutorial.
(Like the behaviour of the...
It's a method in the other class that will "write a line saying that it does not exist". As far as the ArrayOps1D class is concerned you need to decide what the getPosition() method is going to...
And another thing the documentation should clear up: what is the method supposed to return when a value occurs multiple times within an array?
/**
* Comment needed here!
*/
public static int getPosition(int[]scores, int number)
{
int holder = 0;
for (int i = 0; i < scores.length; i++)
{
if(number ==...