Although java does allow
return amount = 50;
It is an assignment statement and it assigns to the variable amount the value of 50 and then returns the variable amount. Also, from your code, it seems that you're returning the same thing regardless of whether it goes into the if or the else.
Did you mean to do that?
(Note, I actually had been unsure if java even allowed such a statement, I knew that C++ did allow something like (while amount = 50) whereas java did not and assumed java wouldn't allow a return that did an assignment statement either, but it apparently does allow it here.)