sumOdd
I m not getting the correct answers . Why ? public class SumOddRange { public static boolean isOdd(int number){ if (number<0){ return false; } else{ if(number % 2 == 0){ return false; } else{ return true; } } } public static int sumOdd(int start, int end){ int sum =0; if (start > end || start < 0 || end < 0) { return -1; } else { if (isOdd(start) && isOdd(end)){ for (int i = start; i <= end; i++) { sum += i; } } } return sum; } }