title: Java Constructors- Assigning value to variable
body: <p>Is there a difference between assigning values to variables outside of any method, and assigning these values within a constructor?</p>
  
  <p>Looking at Oracle's Java tutorial, they have:</p>
  
  <pre><code>public class Bicycle {
  
     int cadence = 0;
     int speed = 0;
     int gear = 1;
  
     void changeCadence(int newValue) {
        cadence = newValue;
     }
  </code></pre>
  
  <p>is this any different from saying/why didn't they just say:</p>
  
  <pre><code>Bicycle(){
      int cadence = 0;
   } 
  </code></pre>