How to call object from another class in Java?
<p>How to call Query class in ShowDetails in following code? </p>

<pre><code>public class ShowDetails 
{       
    // I have to call Query object here 
}

public class SearchResults 
{
    private Query query;
    private Analyzer analyzer;
    //i have set property in this class of that object 
    public void setQuery(Query query)
    {
        this.query=query;
    }

    public Query getQuery() {
        return query;
    }
}   
</code></pre>
