Well, the solution is pretty simple, I suggest this algorithm for the highest odd number:

int highestOdd = Integer.MIN_VALUE;
if (number is odd and number > highestOdd) {
highestOdd =...