Java, alert parent on object change
<p>I have the following setup in Java,</p>

<pre><code>public class Main {

    // starts sub class
    SubClass sub = new SubClass();
    sub.start();

    // sub will keep running and call method alert() on a specif change
    // method alert is void but updates a public variable named status on sub
    while(1==1) {

        // I should ideally be able to catch/read sub status result here
        // how can I do it?
    }
}
</code></pre>

<p>I'm new to Java so this may not be valid and my approach may be wrong. That being the case please point me in the right direction.</p>

<p>Thank you.</p>
