title: Java-Cannot assign a value to final variable
body: <pre><code>class SomeClass{
  
      final static int temp;
      //temp=30;
      SomeClass(int a){
          System.out.println("here");
          temp=a;
      }
  }
  
  public class HelloWorld{
  
      public static void main(String args[]){
  
          SomeClass t1 = new SomeClass(10);
          SomeClass t2 = new SomeClass(20);
  
          System.out.println("t1:"+t1.temp);
          System.out.println("t2:"+t2.temp);
      }   
  }
  </code></pre>
  
  <p>When I create object t2 of SomeClass I can't assign value 20 to it. What could be the reason here? I cannot understand the final static int type. </p>