title: Private method location within code (Java)
body: <p>I was wondering if there is a convention regarding where in code to locate private methods for a class. Should they be listed after public methods to make the distinction clear, before them, or is it considered OK to intersperse them? For example</p>
  
  <pre><code>public class example{
  
     public example()...
  
     public int some_method()...
  
     public int another_method()...
  
     private boolean helper_method()...
  }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code> public class example{
  
        public example()...
  
        public int some_method()...
  
        private boolean helper_method()...
  
        public int another_method()...
   }
  </code></pre>
  
  <p>When coding in C/C++ I generally group functions based on dependencies, but in that case the API is made clear by the header file. For Java, I would gravitate toward listing all the public methods first to make it clear which methods are publicly accessible, but I want to make sure this isn't bad practice. </p>