I assume that you do not systematically put the main () method in every class you write (in this later case, you should imagine block tests instead).
As long as your class contains the main () method, as well as the entry point of your application, this class should not have any behavior other than initializing the application. This good practice is called "Separation of problems": one class = one responsibility.
If so, you should not have such methods in your class. I always always sort the method by importance: the most important / useful / central methods are primarily other methods that do not add any real work (setters and getters for me like that).
Thus, the reader has access to the most important information.
Of course, the coding using the Java convention, which I recommend, implies that you first declare your class fields before declaring your methods.
Olivier B.
source share