title: What is the local variable?
body: <pre><code>class subject {
  
      private String sub;
      private int marks;
      private double average;
  
      public subject() {
          sub = &quot;Physics&quot;;
          marks = 60;
          average = 79.5;
          int x = 20;
          double y = 30;
      }
  
      public void change(String a) {
          int z = 10;
          sub = a;
      }
  
      public String display() {
          int w = 5;
          return sub;
      }
  }
  </code></pre>
  <p>What are the local variables in this program? are they <em>int x; double y; int z; int w;</em>?
  or <em>sub; int z; int w;</em>?</p>