Search:

Type: Posts; User: pbrockway2

Search: Search took 0.19 seconds.

  1. Re: Not sure how to logically correct a method.

    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...
  2. Re: Not sure how to logically correct a method.

    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...
  3. Re: Not sure how to logically correct a method.

    And another thing the documentation should clear up: what is the method supposed to return when a value occurs multiple times within an array?
  4. Re: Not sure how to logically correct a method.

    /**
    * Comment needed here!
    */
    public static int getPosition(int[]scores, int number)
    {
    int holder = 0;

    for (int i = 0; i < scores.length; i++)
    {
    if(number ==...
Results 1 to 4 of 4