title: Error: required variable, found:value
body: <p>I am trying this code in java. Why this error is encountered not able to figure out.</p>
  
  <p>g(i,s)=co[i][1] gives this error. Why ?</p>
  
  <pre><code>    static int g(int i,HashSet&lt;Integer&gt; s){
          if(s.isEmpty()) {
              g(i,s)=co[i][1];
          } 
          else for(int j=2;j&lt;=n;j++) {
              d=co[i][j]+g(j,s);
              if(d&lt;min)min=d;
          }
          g(i,s)=min;
          return g(i,s);
      } 
  </code></pre>