I want to know what's wrong with my coding

That's not helpful.

Maybe if you used the IDE auto format tool, it would help you visualise your code better

Please remember to use code tags when posting code.