title: Understanding bytecode generated for a simple java class
body: <p>I am following this <a href="http://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html" rel="nofollow">blog</a> to study java to bytecode &amp; I have generated bytecode for this SimpleClass. </p>
  
  <pre><code>public class SimpleClass {
  
      public int simpleF = 5;
  
  
  }
  </code></pre>
  
  <p>I understand the bytecode positions as below</p>
  
  <ul>
  <li>0 is for 'this'  </li>
  <li>1 is for calling the constructor of superclass
  Object. </li>
  <li>4  -- ? </li>
  <li>5 for value 5 </li>
  <li>6 pop from stack and assign 5 to
  variable.</li>
  </ul>
  
  <p>But I do not understand <code>aload_0</code> at position 4 and its purpose ?</p>
  
  <pre><code>// Compiled from SimpleClass.java (version 1.6 : 50.0, super bit)
  public class SimpleClass {
  
    // Field descriptor #6 I
    public int simpleF;
  
    // Method descriptor #8 ()V
    // Stack: 2, Locals: 1
    public SimpleClass();
       0  aload_0 [this]
       1  invokespecial java.lang.Object() [10]
       4  aload_0 [this]
       5  iconst_5
       6  putfield SimpleClass.simpleF : int [12]
       9  return
        Line numbers:
          [pc: 0, line: 2]
          [pc: 4, line: 4]
          [pc: 9, line: 2]
        Local variable table:
          [pc: 0, pc: 10] local: this index: 0 type: SimpleClass
  }
  </code></pre>