public static boolean isMultipleFive(int number) {
String temp = ""+number;
char c = temp.charAt(temp.length()-1);
return c == '5' || c == '0';
}
--- Update ---
you cannot compare 2 strings with ==.
use .equals
public static boolean isMultipleFive2(int number) {
boolean check = false;
String temp = Integer.toString(number);
int[] newGuess = new int[temp.length()];
for (int i = 0; i < temp.length(); i++) {
newGuess[i] = temp.charAt(i) - '0';
}
if (String.valueOf(newGuess[newGuess.length - 1]).equals("5")
|| String.valueOf(newGuess[newGuess.length - 1]).equals(String.valueOf(0))) {
check = true;
}
return check;
}