How to read a variable from another class?
<p>Im wondering how can I read a variable from one class's to another?</p>

<p>I have two class's, triangle.java and screen.java</p>

<p>in triangle.java I have: public double bound=0;</p>

<p>how to I read that variable in Screen.java? </p>

<p>triangle.java:</p>

<pre><code>public class triangle extends Activity
{

public EditText txtbound;
public double bound = 0;

txtbound = (EditText)findViewById(R.id.txtbound);

public double calculate()
{
    bound=Double.parseDouble(txtbound.getText().toString());

    // do maths here

}
}
</code></pre>

<p>and Screen.java has:</p>

<pre><code>double bound1 = triangle.bound;   
</code></pre>

<p>this doesnt work, how to I get the variable in Screen.java? thanks!    </p>
