java : get values from table and apply formula
<p>in the bellow code, I try to calcul the formula:</p>

<p>y=val1+val2+val4/all values </p>

<p>val is a string get from a table.</p>

<p>my aim is , for a row 0, get all values from each column "values" then calcul the formule.</p>

<p>after that do the same for each row.
but my code doesn't print me the expected behaviour for the first step. </p>

<p>thanks,</p>

<pre><code>&gt;     String[] values = { x1,x2,x3,x4};
&gt;         
&gt;         String val = null ;
&gt;         for (int i = 0; i &lt; values .length; i++)
&gt;         {
&gt;            val = table.getValue(0, table.getColumnValue(x[i]));
&gt;             
&gt;         }
&gt; 
&gt; //my fomula y = value[x[0]]+value[x[1]]+value[x[3]]/values[0..3]
&gt; 
&gt; int Num =  Integer.parseInt(value[x[0]])+Integer.parseInt(value[x[1]])+Integer.parseInt(value[x[3]]); 
&gt; int Denum =  Integer.parseInt(val );
&gt; 
&gt; y=Num/Denum ;
</code></pre>
