You don't want to
run this program but you want to
compile it and the compiler is complaining. You should've included its error diagnostic message verbatim (including the line number where the error was diagnosed).
The compiler is complaining because of this line:
-
else if(ob1.compareTo(ob3)<1)
-
... because it isn't clever enough to see that if an integer is not > 0 that it is supposed to be < 1; according to the compiler that test might fail and then nothing else is returned from your method. That test is superfluous so remove it an just leave in the 'else' part.
kind regards,
Jos