Waiting for the method's return value
<p>I am really a noob in java, so here's my problem.
I have a returning String:</p>

<pre><code>public static String pushToServer(String data){
    //some code here
            Thread.sleep(10000);
            getResponse(); //accesing a public void method
    return string;
    }
</code></pre>

<p>The problem is, that <code>return string</code> code return null, because getResponse() method requests a couple of second to get the respose. Any way to wait for getResponse() to finish and only then returning String?</p>
