Created
October 20, 2012 17:29
-
-
Save mikeebert/3924142 to your computer and use it in GitHub Desktop.
method examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// changes value but doesn't return anything. takes in two integers as arguments. | |
public void changeArrayValue(int indexToChange, int newValue) { | |
numbers[indexToChange] = newValue; | |
} | |
//changes value and returns new array | |
public int[] changeAndReturnUpdatedArray(int indexToChange, int newValue) { | |
numbers[indexToChange] = newValue; | |
return numbers; | |
} | |
//returns true and false | |
public boolean checkArrayLengthforForgetfulPeople(int lengthGuess) { | |
if (numbers.length == lengthGuess) | |
return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment