title: Why can't i use static variable in java constructor?
body: <p>The compiler says <code>illegal modifier for parameter i</code>.<br>
  Please tell me what I'm doing wrong. Why can't I use a static variable in a Java constructor?</p>
  
  <pre><code>class Student5{  
  
      Student5() {  
          static int i = 0;
          System.out.println(i++);  
      }
  
      public static void main(String args[]){  
          Student5 c1 = new Student5();
          Student5 c2 = new Student5();
          Student5 c3 = new Student5();
      }
  }  
  </code></pre>