title: Java best practice - Is declaring the constructor before the class variables a bad thing?
body: <p>I'm undertaking a 'static' code walkthrough of Java code from a colleague (another student)</p>
  
  <p>To me, this doesn't make sense; reading from top to bottom these 'component' objects are instantiated (and later used in the constructor) before they are declared. But, the code happily compiles and runs. Is this bad practice?</p>
  
  <pre><code>Public Class theObject {
  
      private static final long aVariable = 123123123123123;
  
      public theObject(...){
  
          componentOne = new Component(...);
          componentTwo = new Component(...);
  
          ...
          ...
          componentOne.doSomething(...);
      }
  
      private Component componentOne;
      private Component componentTwo;
  }
  </code></pre>