Cannot refer to a non-final variable inside an inner class defined in different method
<pre><code>new Thread(new Runnable() 
                {
                    public void run() {
                        while ( statusStr==null)
                        {
                            progressBarHandler.post(new Runnable() {
                                public void run() {
                                    progressBar.setProgress(progressBarStatus);
                                }
                            });
                        }

                    }
                    }).start();
</code></pre>

<p>Friends,I have referred other question but I am still confused so please help me in solving this issue. I cannot keep statusStr as final coz its values are updating while the app is working so please give me a solution.</p>
