Well, my answer will consist of several pages where you can find what you need.
1.- First, I would recommend that you read the conventions that Oracle recommends for java
NOTE: in particular, the section " Naming Conventions " (which is what most of the other answers have), after which I suggest you read " Java Languages Keywords , because you cannot use any of these words, BUT remember that JAVA CASE-SENSITIVE , therefore, if you write "Abstract" instead of "abstract", then everything is in order, but, of course, it can confuse someone later (maybe yourself).
2.- And last but not least, you can read the " Code Style Rules ", these are conventions that contribute to the Android source code you need to apply to their code in order to be accepted.
If you follow these rules, your code will not only be valid (of course, this is important), it will be more readable for you and others, and if another person needs to make some changes later, it will be easier than if you started typing random ones names like "x1, x2, X1, _x1, etc."
OTHER USEFUL ARTICLE :
If you are starting your application, this article will be very useful for you, this explains why using setters and getters in exaggerated form is a very bad practice, they should be ONLY if it is necessary not only to set and get each variable in your object .
Jorge aguilar
source share