title: "Non-static variable this cannot be referenced from a static context" when creating an object
body: <p>I wrote the below code to test the concept of classes and objects in Java.</p>
  
  <pre><code>public class ShowBike {
      private class Bicycle {
          public int gear = 0;
          public Bicycle(int v) {
              gear = v;
          }
      }
  
      public static void main() {
          Bicycle bike = new Bicycle(5);
          System.out.println(bike.gear);
      }
  }
  </code></pre>
  
  <p>Why does this give me the below error in the compiling process?</p>
  
  <pre><code>ShowBike.java:12: non-static variable this cannot be referenced from a static context
          Bicycle bike = new Bicycle(5);
                         ^
  </code></pre>