To be honest, when I first started programming in Java, I had this problem too. I started programming in BASIC, and organizing code is a pain to do in BASIC because of the abstract loops. When I tried pushing what I knew from Basic to C++ and later Java, it became harder to find code and I found myself scared to look into my own code.
There is plenty that you can do to make your classes and code more readable. It all starts small.
1) Have a plan: It is very difficult to know how to write code if you don’t have a plan. I like to write down my ideas on a notebook, then I write little one-line comments inside my code that corresponds with the plan. It helps me to visualize a to do list and I can follow what classes match with the ideas I have.
2) Write meaningful variable names: These can be a lot more helpful than comments sometimes. I realized that if you have a variable name called character_HP instead of temp_variable_1. It’ll be easier to track where a variable is in relation to your code. Having great class names and function names goes a long way in organization.
3) Look at tutorials: If you didn’t take any programming classes (highly recommended btw). The next best thing you can do is look at how people in tutorials organize their code and base your code off of it. Java tutorials have extremely readable code filled with comments and information that is easy to follow. If you write code like they do, your code will naturally become more readable as well.
4) Write comments: It takes a few seconds to do, but in the long run it’ll make your code a lot easier for you to follow. You don’t even have to write JavaDocs, just basic one-liners put throughout your code will allow you to keep a log of what you were thinking. Very helpful when you come back after a year and forgot everything you did on that day.
Of course, organizing your code into separate folders, having good package names, indenting code, and using an IDE that has color coding really helps a lot. It is all about maintenance of your own code. If you don’t set strict guidelines for yourself on how to code, you code will become naturally messy and you’ll lose where things go. If you start out setting up rules for yourself early, your code will be a lot easier to read later on. It depends on you.
If I were you, I’d look into re-factoring the classes that have the most problems so you can continue coding. Once you find out what a variable does, write a comment in there so you don’t have to search twice.