Get value from different class in android/java
<p>I want to get a return value from a function From CLass A in class B. But i do not want to create a new instance of class A in Class B. Since all the variable value in class a are null if i create a new instance. I also cannot use static in the function because i dont get access to non static varible. I have tried using aync task/ handler to but cannot find any way to return value from handle message></p>

<pre><code>public class ClassA(){
     List&lt;String&gt; stringlist;

    public List&lt;String&gt; getStringlist() {
    //code  
    return stringlist;
     }
}

public class ClassB(){

    public void getValueFromCLassA {
        ClassA classA = new ClassA();
        List&lt;string&gt; string = classA.getStingList();
    }
}
</code></pre>