Static for loop? Performing calculations before
<p>I'm feeling lost as to how to do this. I am trying to perform a calculation with a value that needs to be a global variable. but to be global it has to be static. I need the for loop to be static too so it can perform the calculation in the array but I can't remember how to do this. 
The very last line of code is where I am stuck currently due to "Cannot find symbol" errors. I am trying to find a way to bring yVal0 in to this method so I can perform the calculation</p>

<pre><code>import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class RegressionGUI  extends JFrame
    implements ActionListener {
private JLabel VariableLabel = new JLabel("Select one independent Variable");
</code></pre>
