I have this code below and it keep telling me that thanksgiving() must return a result type of int. I have casted all the results just to make sure, but nothing seems to be work
The Java compiler is too stupid to realize that in every situation, one of your conditions will be satisfied. It sees the if statements and thinks that it is possible that none of them will be satisfied. You can add a return at the end of the method that indicates an error case, you can throw an exception, or you can assert false
.