title: What is local variable and objects in memory model?
body: <p>I have a class given below. In this class what are the variable going to store in heap and what are the variable going to store in Thread stack of java memory model. I know that local variable is stored in stack and objects stored in heap. but I need explanation from given class. </p>
  
  <pre><code>class School {
  
       public int id =1;
  
       public Student student=new Student();;
  
       public void method(Student st, int f ){
  
          Student stud = new Student();
          int fees = 100;
      }
  
  }
  </code></pre>
  
  <p>thanks</p>